Skip to content

Commit 56f4d7d

Browse files
committed
ci: use native arm runner and remove cross
1 parent bd28044 commit 56f4d7d

3 files changed

Lines changed: 27 additions & 23 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,20 @@ jobs:
3737
contents: read
3838
strategy:
3939
matrix:
40-
build: [x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos, x86_64-win-msvc]
40+
build:
41+
[
42+
x86_64-linux,
43+
aarch64-linux,
44+
x86_64-macos,
45+
aarch64-macos,
46+
x86_64-win-msvc,
47+
]
4148
include:
4249
- build: x86_64-linux
4350
os: ubuntu-latest
4451
target: x86_64-unknown-linux-gnu
4552
- build: aarch64-linux
46-
os: ubuntu-latest
53+
os: ubuntu-24.04-arm
4754
target: aarch64-unknown-linux-gnu
4855
- build: x86_64-macos
4956
os: macos-latest
@@ -69,21 +76,17 @@ jobs:
6976
with:
7077
key: ${{ matrix.target }}
7178

72-
- name: Install cross for arm64 compilation
73-
if: matrix.build == 'aarch64-linux'
74-
run: cargo install cross --git https://github.com/cross-rs/cross
75-
76-
- name: Install Dependencies for Linux x86_64
77-
if: matrix.build == 'x86_64-linux'
79+
- name: Install Dependencies for Linux
80+
if: contains(matrix.build, 'linux')
7881
run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
7982

8083
- name: Run tests (arm64)
8184
if: matrix.build == 'aarch64-linux'
82-
run: cross test --locked --target ${{ matrix.target }}
85+
run: cargo test --locked --target ${{ matrix.target }}
8386

8487
- name: Build debug binary (arm64)
8588
if: matrix.build == 'aarch64-linux'
86-
run: cross build --locked --target ${{ matrix.target }}
89+
run: cargo build --locked --target ${{ matrix.target }}
8790

8891
- name: Run tests (x86_64)
8992
if: matrix.build != 'aarch64-linux'

.github/workflows/deploy.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Deploy
22
on:
3-
workflow_dispatch:
3+
workflow_dispatch:
44
inputs:
55
new_version:
66
description: New version to deploy
@@ -21,13 +21,20 @@ jobs:
2121
strategy:
2222
fail-fast: false # don't fail other jobs if one fails
2323
matrix:
24-
build: [x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos, x86_64-win-msvc]
24+
build:
25+
[
26+
x86_64-linux,
27+
aarch64-linux,
28+
x86_64-macos,
29+
aarch64-macos,
30+
x86_64-win-msvc,
31+
]
2532
include:
2633
- build: x86_64-linux
2734
os: ubuntu-latest
2835
target: x86_64-unknown-linux-gnu
2936
- build: aarch64-linux
30-
os: ubuntu-latest
37+
os: ubuntu-24.04-arm
3138
target: aarch64-unknown-linux-gnu
3239
- build: x86_64-macos
3340
os: macos-latest
@@ -47,23 +54,19 @@ jobs:
4754
uses: dtolnay/rust-toolchain@stable
4855
with:
4956
target: ${{ matrix.target }}
50-
57+
5158
# Cache dependencies
5259
- uses: Swatinem/rust-cache@v2
5360
with:
5461
key: ${{ matrix.target }}-release
5562

56-
- name: Install cross for arm64 compilation
57-
if: matrix.build == 'aarch64-linux'
58-
run: cargo install cross --git https://github.com/cross-rs/cross
59-
60-
- name: Install Dependencies for Linux x86_64
61-
if: matrix.build == 'x86_64-linux'
63+
- name: Install Dependencies for Linux
64+
if: contains(matrix.build, 'linux')
6265
run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
6366

6467
- name: Build release binary (arm64)
6568
if: matrix.build == 'aarch64-linux'
66-
run: cross build --release --locked --target ${{ matrix.target }}
69+
run: cargo build --release --locked --target ${{ matrix.target }}
6770

6871
- name: Build release binary (x86_64)
6972
if: matrix.build != 'aarch64-linux'

Cross.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)