Compare commits

...

5 Commits

Author SHA1 Message Date
Michael Neale
95e5a59720 linux build specifics 2025-11-20 09:16:08 +11:00
Michael Neale
04ceefd5e2 deps 2025-11-20 09:10:32 +11:00
Michael Neale
40f9ea5eb3 tighten platforms 2025-11-20 09:08:51 +11:00
Michael Neale
69ae894de8 cleaning up CI 2025-11-20 09:04:15 +11:00
Michael Neale
3643dad354 trying out running tests 2025-11-20 08:57:31 +11:00

73
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-latest
arch: aarch64
- os: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
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
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.arch || 'x86_64' }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install system dependencies (Ubuntu)
if: runner.os == 'Linux' && matrix.arch != 'aarch64'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev libxtst-dev
- 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 libxtst-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
run: |
. $HOME/.cargo/env
cargo build --workspace --exclude g3-computer-control
cargo test --workspace --exclude g3-computer-control --lib --tests
- name: Build (Linux x86_64)
if: matrix.arch != 'aarch64' && runner.os == 'Linux'
run: cargo build --workspace --exclude g3-computer-control
- name: Run tests (Linux x86_64)
if: matrix.arch != 'aarch64' && runner.os == 'Linux'
run: cargo test --workspace --exclude g3-computer-control --lib --tests
- name: Build (macOS)
if: runner.os == 'macOS'
run: cargo build --workspace
- name: Run tests (macOS)
if: runner.os == 'macOS'
run: cargo test --workspace --lib --tests