Skip to content

Beacon updates

Beacon updates #106

Workflow file for this run

name: Gosub Continuous Integration (CI)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
# Beacon depends on the engine through relative path dependencies
# (`../gosub-engine/crates/*`, see Cargo.toml), so CI checks the engine out as a
# sibling directory. The engine work Beacon needs lives on the `beacon-updates`
# branch until it is merged; then switch ENGINE_REF to main.
ENGINE_REPO: gosub-io/gosub-engine
ENGINE_REF: beacon-updates
jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust_version: [ stable ]
steps:
- uses: actions/checkout@v4
with:
path: gosub-beacon
- uses: actions/checkout@v4
with:
repository: ${{ env.ENGINE_REPO }}
ref: ${{ env.ENGINE_REF }}
path: gosub-engine
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
libgtk-4-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev \
libsqlite3-dev libssl-dev pkg-config \
clang libclang-dev libgl-dev libegl-dev libfontconfig-dev libfreetype-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: gosub-beacon
- name: Build
working-directory: gosub-beacon
run: cargo build --verbose --all
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust_version: [ stable ]
steps:
- uses: actions/checkout@v4
with:
path: gosub-beacon
- uses: actions/checkout@v4
with:
repository: ${{ env.ENGINE_REPO }}
ref: ${{ env.ENGINE_REF }}
path: gosub-engine
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
libgtk-4-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev \
libsqlite3-dev libssl-dev pkg-config \
clang libclang-dev libgl-dev libegl-dev libfontconfig-dev libfreetype-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: gosub-beacon
- name: Run tests
working-directory: gosub-beacon
run: cargo test --verbose --all --no-fail-fast --all-targets
clippy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
path: gosub-beacon
- uses: actions/checkout@v4
with:
repository: ${{ env.ENGINE_REPO }}
ref: ${{ env.ENGINE_REF }}
path: gosub-engine
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
libgtk-4-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev \
libsqlite3-dev libssl-dev pkg-config \
clang libclang-dev libgl-dev libegl-dev libfontconfig-dev libfreetype-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: gosub-beacon
- name: Run Clippy
working-directory: gosub-beacon
run: cargo clippy --all --tests -- -D warnings
fmt:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run fmt
run: cargo fmt --check --all