Skip to content

Commit a4e8245

Browse files
committed
ci: build Linux natively on Ubuntu 22.04 instead of cross
The cross image for x86_64-unknown-linux-gnu is still based on Ubuntu 20.04, whose gcc trips aws-lc-sys's compiler-bug check. Targeting 22.04 as the minimum supported glibc, a native build on ubuntu-22.04 is simpler and sidesteps the cross container entirely. Windows still uses cross since it's an actual cross-compile.
1 parent a2ce990 commit a4e8245

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,16 @@ jobs:
7272
build:
7373
needs: [ check-release ]
7474
if: needs.check-release.outputs.new_release_published == 'true'
75-
runs-on: ubuntu-latest
7675

7776
strategy:
7877
matrix:
79-
target: [ linux-x64, windows-x64 ]
78+
include:
79+
- target: linux-x64
80+
runner: ubuntu-22.04
81+
- target: windows-x64
82+
runner: ubuntu-latest
83+
84+
runs-on: ${{ matrix.runner }}
8085

8186
steps:
8287
- name: Checkout
@@ -87,8 +92,6 @@ jobs:
8792

8893
- uses: Swatinem/rust-cache@v2
8994

90-
- run: sudo apt-get update && sudo apt-get install libdbus-1-dev libfontconfig1-dev
91-
9295
- name: Update version
9396
run: |
9497
sed -i '/\[package\]/,/^version = "[^"]*"$/ s/^version = "[^"]*"$/version = "'"${{ needs.check-release.outputs.new_release_version }}"'"/' Cargo.toml
@@ -97,13 +100,14 @@ jobs:
97100

98101
- name: Build Binary
99102
run: |
100-
cargo install cross --git https://github.com/rust-embedded/cross
101-
102103
if [ "${{ matrix.target }}" == "linux-x64" ]; then
103-
cross build --release --target x86_64-unknown-linux-gnu
104+
sudo apt-get update
105+
sudo apt-get install --assume-yes libdbus-1-dev libfontconfig1-dev
106+
cargo build --release --target x86_64-unknown-linux-gnu
104107
else
108+
cargo install cross --git https://github.com/cross-rs/cross
105109
cross build --release --target x86_64-pc-windows-gnu
106-
sudo apt-get install osslsigncode
110+
sudo apt-get install --assume-yes osslsigncode
107111
echo "${{ secrets.WIN_SIGN_KEY }}" | base64 -d > code_sign.key.pem
108112
echo "${{ secrets.WIN_SIGN_CERT }}" | base64 -d > code_sign.cert.pem
109113
mkdir ./target/x86_64-pc-windows-gnu/signed

0 commit comments

Comments
 (0)