Skip to content

Commit

Permalink
chore(release): add ARM64 linux builds (fishfolk#806)
Browse files Browse the repository at this point in the history
Closes fishfolk#788

Tested here: https://github.com/orhun/FishFight/actions/runs/5204576645 

Unfortunately, `cross` doesn't support wildcard for targets so there is
a bit of code duplication in the config. See
cross-rs/cross#1244
  • Loading branch information
orhun authored and zicklag committed Jun 17, 2023
1 parent 7cb2cbf commit de7a32b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
matrix:
config:
- { os: ubuntu-latest, target: "x86_64-unknown-linux-gnu" }
- { os: ubuntu-latest, target: "aarch64-unknown-linux-gnu" }
- { os: macos-latest, target: "x86_64-apple-darwin" }
- { os: macos-latest, target: "aarch64-apple-darwin" }
- { os: windows-latest, target: "x86_64-pc-windows-msvc" }
Expand All @@ -71,14 +72,6 @@ jobs:
- name: 猬囷笍 Checkout
uses: actions/checkout@v3

- name: 馃О Install dependencies
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y -q \
libasound2-dev \
libudev-dev
- name: 馃 Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -92,6 +85,7 @@ jobs:
with:
command: build
args: --release --locked --target ${{ matrix.config.target }}
use-cross: true

- name: 鈿欙笍 Prepare artifacts [Windows]
shell: bash
Expand Down
11 changes: 11 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
]

[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install -y pkg-config libasound2-dev:$CROSS_DEB_ARCH libudev-dev:$CROSS_DEB_ARCH",
]

0 comments on commit de7a32b

Please sign in to comment.