Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Build and test
runs-on: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork && '["ubuntu-latest"]' || '["self-hosted","linux","x64","wan0-ci","thistle-tk"]') }}
steps:
- uses: actions/checkout@v6

- name: Install native build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libsdl2-dev pkg-config

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust builds
uses: Swatinem/rust-cache@v2
with:
workspaces: |
. -> target
compiler -> target

- name: Test toolkit
run: cargo test --locked --all-targets

- name: Test compiler units
run: cargo test --manifest-path compiler/Cargo.toml --locked --lib --bins