From 56f4d7d27ee2dd9bebdedb7270a65964a6ccaa81 Mon Sep 17 00:00:00 2001 From: replydev Date: Sun, 8 Mar 2026 20:44:55 +0100 Subject: [PATCH 1/3] ci: use native arm runner and remove cross --- .github/workflows/build.yml | 23 +++++++++++++---------- .github/workflows/deploy.yml | 25 ++++++++++++++----------- Cross.toml | 2 -- 3 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 Cross.toml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c190da1..92feac4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,13 +37,20 @@ jobs: contents: read strategy: matrix: - build: [x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos, x86_64-win-msvc] + build: + [ + x86_64-linux, + aarch64-linux, + x86_64-macos, + aarch64-macos, + x86_64-win-msvc, + ] include: - build: x86_64-linux os: ubuntu-latest target: x86_64-unknown-linux-gnu - build: aarch64-linux - os: ubuntu-latest + os: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu - build: x86_64-macos os: macos-latest @@ -69,21 +76,17 @@ jobs: with: key: ${{ matrix.target }} - - name: Install cross for arm64 compilation - if: matrix.build == 'aarch64-linux' - run: cargo install cross --git https://github.com/cross-rs/cross - - - name: Install Dependencies for Linux x86_64 - if: matrix.build == 'x86_64-linux' + - name: Install Dependencies for Linux + if: contains(matrix.build, 'linux') run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev - name: Run tests (arm64) if: matrix.build == 'aarch64-linux' - run: cross test --locked --target ${{ matrix.target }} + run: cargo test --locked --target ${{ matrix.target }} - name: Build debug binary (arm64) if: matrix.build == 'aarch64-linux' - run: cross build --locked --target ${{ matrix.target }} + run: cargo build --locked --target ${{ matrix.target }} - name: Run tests (x86_64) if: matrix.build != 'aarch64-linux' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2cf04f4..1b280fd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,6 @@ name: Deploy on: - workflow_dispatch: + workflow_dispatch: inputs: new_version: description: New version to deploy @@ -21,13 +21,20 @@ jobs: strategy: fail-fast: false # don't fail other jobs if one fails matrix: - build: [x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos, x86_64-win-msvc] + build: + [ + x86_64-linux, + aarch64-linux, + x86_64-macos, + aarch64-macos, + x86_64-win-msvc, + ] include: - build: x86_64-linux os: ubuntu-latest target: x86_64-unknown-linux-gnu - build: aarch64-linux - os: ubuntu-latest + os: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu - build: x86_64-macos os: macos-latest @@ -47,23 +54,19 @@ jobs: uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.target }} - + # Cache dependencies - uses: Swatinem/rust-cache@v2 with: key: ${{ matrix.target }}-release - - name: Install cross for arm64 compilation - if: matrix.build == 'aarch64-linux' - run: cargo install cross --git https://github.com/cross-rs/cross - - - name: Install Dependencies for Linux x86_64 - if: matrix.build == 'x86_64-linux' + - name: Install Dependencies for Linux + if: contains(matrix.build, 'linux') run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev - name: Build release binary (arm64) if: matrix.build == 'aarch64-linux' - run: cross build --release --locked --target ${{ matrix.target }} + run: cargo build --release --locked --target ${{ matrix.target }} - name: Build release binary (x86_64) if: matrix.build != 'aarch64-linux' diff --git a/Cross.toml b/Cross.toml deleted file mode 100644 index 2d7a9be..0000000 --- a/Cross.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.aarch64-unknown-linux-gnu] -pre-build = ["dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes libxcb-render0-dev:arm64 libxcb-shape0-dev:arm64 libxcb-xfixes0-dev:arm64 libxkbcommon-dev:arm64"] \ No newline at end of file From 1d784e1a86b56e496afc37d5666f92fa235e0180 Mon Sep 17 00:00:00 2001 From: replydev Date: Sun, 8 Mar 2026 20:50:25 +0100 Subject: [PATCH 2/3] ci: simplify --- .github/workflows/build.yml | 18 ++++-------------- .github/workflows/deploy.yml | 9 ++------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92feac4..65f7fd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,21 +80,11 @@ jobs: if: contains(matrix.build, 'linux') run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev - - name: Run tests (arm64) - if: matrix.build == 'aarch64-linux' - run: cargo test --locked --target ${{ matrix.target }} + - name: Run tests + run: cargo test --locked --frozen - - name: Build debug binary (arm64) - if: matrix.build == 'aarch64-linux' - run: cargo build --locked --target ${{ matrix.target }} - - - name: Run tests (x86_64) - if: matrix.build != 'aarch64-linux' - run: cargo test - - - name: Build debug binary (x86_64) - if: matrix.build != 'aarch64-linux' - run: cargo build + - name: Build debug binary + run: cargo build --locked --frozen - uses: actions/upload-artifact@v5.0.0 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1b280fd..945db04 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -64,13 +64,8 @@ jobs: if: contains(matrix.build, 'linux') run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev - - name: Build release binary (arm64) - if: matrix.build == 'aarch64-linux' - run: cargo build --release --locked --target ${{ matrix.target }} - - - name: Build release binary (x86_64) - if: matrix.build != 'aarch64-linux' - run: cargo build --release --locked --target ${{ matrix.target }} + - name: Build release binary + run: cargo build --release --locked --frozen --target ${{ matrix.target }} - name: Build archive shell: bash From 830a63dbe7351078f98e8d7ba757d38bc8f1284b Mon Sep 17 00:00:00 2001 From: replydev Date: Sun, 8 Mar 2026 20:52:34 +0100 Subject: [PATCH 3/3] ci: remove frozen flag --- .github/workflows/build.yml | 4 ++-- .github/workflows/deploy.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65f7fd2..9f2bfae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,10 +81,10 @@ jobs: run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev - name: Run tests - run: cargo test --locked --frozen + run: cargo test --locked - name: Build debug binary - run: cargo build --locked --frozen + run: cargo build --locked - uses: actions/upload-artifact@v5.0.0 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 945db04..91ed1ea 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -65,7 +65,7 @@ jobs: run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev - name: Build release binary - run: cargo build --release --locked --frozen --target ${{ matrix.target }} + run: cargo build --release --locked --target ${{ matrix.target }} - name: Build archive shell: bash