Skip to content

Commit c560f97

Browse files
committed
Update actions
1 parent cd39886 commit c560f97

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ jobs:
3333

3434
- uses: mlugg/setup-zig@v2
3535

36-
- uses: hecrj/setup-rust-action@v2
36+
- uses: dtolnay/rust-toolchain@stable
3737
with:
38-
rust-version: stable
3938
targets: ${{ matrix.target }}
4039

4140
- name: Check Cargo availability
@@ -47,9 +46,15 @@ jobs:
4746
- name: Build
4847
run: |
4948
echo 'lto = "fat"' >> Cargo.toml
50-
env RUSTFLAGS="-C strip=symbols" cargo build --release
49+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
50+
env RUSTFLAGS="-C strip=symbols" cargo build --release --target ${{ matrix.target }}
51+
bin_dir=target/${{ matrix.target }}/release
52+
else
53+
env RUSTFLAGS="-C strip=symbols" cargo build --release
54+
bin_dir=target/release
55+
fi
5156
mkdir encrypted-dns
52-
cp target/release/encrypted-dns${{ matrix.bin_suffix }} encrypted-dns/
57+
cp ${bin_dir}/encrypted-dns${{ matrix.bin_suffix }} encrypted-dns/
5358
cp README.md example-encrypted-dns.toml encrypted-dns/
5459
if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then
5560
tar cjpf ${ARCHIVE_PATH} encrypted-dns

.github/workflows/test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: [ubuntu-latest, windows-latest]
10+
include:
11+
- os: ubuntu-latest
12+
target: x86_64-unknown-linux-gnu
13+
- os: windows-latest
14+
target: x86_64-pc-windows-msvc
1115

1216
steps:
1317
- uses: actions/checkout@v5
14-
- uses: hecrj/setup-rust-action@v2
18+
- uses: dtolnay/rust-toolchain@nightly
1519
with:
16-
rust-version: nightly
20+
targets: ${{ matrix.target }}
1721
- name: Check Cargo availability
1822
run: cargo --version
1923
- name: Check Rustup default toolchain
2024
run: rustup default | grep nightly
2125
- name: Test
2226
run: |
23-
cargo test
27+
cargo test --target ${{ matrix.target }}

0 commit comments

Comments
 (0)