diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c190da1..9f2bfae 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,29 +76,15 @@ 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 }} - - - name: Build debug binary (arm64) - if: matrix.build == 'aarch64-linux' - run: cross build --locked --target ${{ matrix.target }} - - - name: Run tests (x86_64) - if: matrix.build != 'aarch64-linux' - run: cargo test + - name: Run tests + run: cargo test --locked - - name: Build debug binary (x86_64) - if: matrix.build != 'aarch64-linux' - run: cargo build + - name: Build debug binary + 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 2cf04f4..91ed1ea 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,26 +54,17 @@ 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 }} - - - name: Build release binary (x86_64) - if: matrix.build != 'aarch64-linux' + - name: Build release binary run: cargo build --release --locked --target ${{ matrix.target }} - name: Build archive 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