name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
check:
uses: ./.github/workflows/check.yml
build:
needs: check
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Install musl tools
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get install -y musl-tools
- run: cargo build --release --target ${{ matrix.target }}
- uses: actions/upload-artifact@v7
with:
name: jgl-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/jgl
target/${{ matrix.target }}/release/jgl.exe