tighten platforms
This commit is contained in:
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
@@ -9,7 +9,12 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
arch: x86_64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
arch: aarch64
|
||||||
|
- os: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -17,6 +22,10 @@ jobs:
|
|||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Set up QEMU (for aarch64 on Linux)
|
||||||
|
if: matrix.arch == 'aarch64' && runner.os == 'Linux'
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Cache cargo
|
- name: Cache cargo
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@@ -24,16 +33,33 @@ jobs:
|
|||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-${{ matrix.arch || 'x86_64' }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Install system dependencies (Ubuntu)
|
- name: Install system dependencies (Ubuntu)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux' && matrix.arch != 'aarch64'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev
|
sudo apt-get install -y libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev
|
||||||
|
|
||||||
- name: Build
|
- name: Build and test (Linux aarch64)
|
||||||
|
if: matrix.arch == 'aarch64' && runner.os == 'Linux'
|
||||||
|
uses: uraimo/run-on-arch-action@v2
|
||||||
|
with:
|
||||||
|
arch: aarch64
|
||||||
|
distro: ubuntu22.04
|
||||||
|
install: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y curl build-essential libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
|
run: |
|
||||||
|
. $HOME/.cargo/env
|
||||||
|
cargo build --workspace
|
||||||
|
cargo test --workspace --lib --tests
|
||||||
|
|
||||||
|
- name: Build (Linux x86_64 / macOS)
|
||||||
|
if: matrix.arch != 'aarch64'
|
||||||
run: cargo build --workspace
|
run: cargo build --workspace
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests (Linux x86_64 / macOS)
|
||||||
|
if: matrix.arch != 'aarch64'
|
||||||
run: cargo test --workspace --lib --tests
|
run: cargo test --workspace --lib --tests
|
||||||
|
|||||||
Reference in New Issue
Block a user