Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Feb 25, 2024
1 parent 130a076 commit 852b5f3
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI

on:
pull_request:
release:
types:
- released
- prereleased

jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Build
run: cargo build --release
- name: Tests
run: cargo test --no-default-features --release

windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.9']
target: [x64]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
if: matrix.target == 'x64'
run: cargo build --release
- name: Tests
if: matrix.target == 'x64'
run: cargo test --no-default-features --release

linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
target: [x86_64]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Tests
run: cargo test --no-default-features --release

0 comments on commit 852b5f3

Please sign in to comment.