Beacon updates #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. Bump this when the engine work Beacon needs lands elsewhere. | |
| ENGINE_REPO: gosub-io/gosub-engine | |
| ENGINE_REF: beacon | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust_version: [ stable ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: gtk-browser | |
| - 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: gtk-browser | |
| - name: Build | |
| working-directory: gtk-browser | |
| 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: gtk-browser | |
| - 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: gtk-browser | |
| - name: Run tests | |
| working-directory: gtk-browser | |
| run: cargo test --verbose --all --no-fail-fast --all-targets | |
| clippy: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: gtk-browser | |
| - 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: gtk-browser | |
| - name: Run Clippy | |
| working-directory: gtk-browser | |
| 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 |