Use ubuntu 20.04 for builds, because some people still use it

pull/175/head
Frank Denis 1 year ago
parent 149849fdc8
commit 41cd192214

@ -10,9 +10,9 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-20.04, windows-latest]
include: include:
- os: ubuntu-latest - os: ubuntu-20.04
target: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-gnu
target_alias: linux-x86_64 target_alias: linux-x86_64
bin_suffix: '' bin_suffix: ''
@ -29,7 +29,9 @@ jobs:
ARCHIVE_PATH: encrypted-dns_${{ github.ref_name }}_${{ matrix.target_alias }}${{ matrix.archive_suffix }} ARCHIVE_PATH: encrypted-dns_${{ github.ref_name }}_${{ matrix.target_alias }}${{ matrix.archive_suffix }}
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v3
- uses: goto-bus-stop/setup-zig@v2
- uses: hecrj/setup-rust-action@master - uses: hecrj/setup-rust-action@master
with: with:
@ -45,20 +47,20 @@ jobs:
- name: Build - name: Build
run: | run: |
echo 'lto = "fat"' >> Cargo.toml echo 'lto = "fat"' >> Cargo.toml
env RUSTFLAGS="-C link-arg=-s" cargo build --release env RUSTFLAGS="-C strip=symbols" cargo build --release
mkdir encrypted-dns mkdir encrypted-dns
cp target/release/encrypted-dns${{ matrix.bin_suffix }} encrypted-dns/ cp target/release/encrypted-dns${{ matrix.bin_suffix }} encrypted-dns/
cp README.md example-encrypted-dns.toml encrypted-dns/ cp README.md example-encrypted-dns.toml encrypted-dns/
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then if [ "${{ matrix.os }}" = "ubuntu-20.04" ]; then
tar cjpf ${ARCHIVE_PATH} encrypted-dns tar cjpf ${ARCHIVE_PATH} encrypted-dns
elif [ "${{ matrix.os }}" = "windows-latest" ]; then elif [ "${{ matrix.os }}" = "windows-latest" ]; then
"/C/Program Files/7-Zip/7z" a ${ARCHIVE_PATH} encrypted-dns "/C/Program Files/7-Zip/7z" a ${ARCHIVE_PATH} encrypted-dns
fi fi
- name: Install cargo-deb and build Debian package - name: Install cargo-deb and build Debian package
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-20.04' }}
run: | run: |
cargo install --debug cargo-deb cargo install cargo-deb
cargo deb --output=encrypted-dns_${{ github.ref_name }}_amd64.deb --no-build cargo deb --output=encrypted-dns_${{ github.ref_name }}_amd64.deb --no-build
- uses: actions/upload-artifact@master - uses: actions/upload-artifact@master
@ -67,7 +69,7 @@ jobs:
path: ${{ env.ARCHIVE_PATH }} path: ${{ env.ARCHIVE_PATH }}
- uses: actions/upload-artifact@master - uses: actions/upload-artifact@master
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-20.04' }}
with: with:
name: encrypted-dns_deb-amd64 name: encrypted-dns_deb-amd64
path: encrypted-dns_${{ github.ref_name }}_amd64.deb path: encrypted-dns_${{ github.ref_name }}_amd64.deb
@ -76,7 +78,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
needs: needs:
- build - build
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3

Loading…
Cancel
Save