Skip to content

Commit

Permalink
Merge pull request #37 from gosub-io/engine-coupling
Browse files Browse the repository at this point in the history
Engine coupling
  • Loading branch information
jaytaph authored Dec 28, 2024
2 parents 57955d1 + 65dc52e commit a036d65
Show file tree
Hide file tree
Showing 11 changed files with 3,791 additions and 617 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[registries]
gosub = { index = "sparse+https://registry.gosub.io/" }
84 changes: 30 additions & 54 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ env:
CARGO_TERM_COLOR: always

jobs:
cache:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Cache cargo
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Cargo update
run: cargo update

build:
runs-on: ubuntu-24.04
needs: cache
strategy:
fail-fast: false
matrix:
Expand All @@ -27,29 +41,19 @@ jobs:
- name: Install dependencies
run: sudo apt update -y && sudo apt install libgtk-4-dev libglib2.0-dev libsqlite3-dev -y
- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: ~/.cargo/
key: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: ~/work/gtk-browser/gtk-browser/target
path: |
~/work/gtk-browser/gtk-browser/target
key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-
restore-keys: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Build
run: cargo build --verbose --all --all-features
- name: Clean
run: |
cargo install cargo-sweep
cargo sweep --installed
cargo sweep --time 7
cargo build --verbose --all --all-features
test:
runs-on: ubuntu-24.04
needs: cache
strategy:
fail-fast: false
matrix:
Expand All @@ -58,33 +62,25 @@ jobs:
# rust_version: [ stable, beta, nightly, 1.79.0, "stable minus 1 release", "stable minus 2 releases" ]
# os: [ ubuntu-24.04, windows-latest, macos-latest ]
steps:
- name: Print CPU info
run: lscpu
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt update -y && sudo apt install libgtk-4-dev libglib2.0-dev libsqlite3-dev -y
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: ~/.cargo
key: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: ~/work/gtk-browser/gtk-browser/target
path: |
~/work/gtk-browser/gtk-browser/target
key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-
restore-keys: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Run tests
run: cargo test --verbose --all --no-fail-fast --all-features --all-targets

clippy:
runs-on: ubuntu-24.04
needs: cache
strategy:
fail-fast: false
matrix:
Expand All @@ -100,40 +96,20 @@ jobs:
with:
toolchain: ${{ matrix.rust_version }}
- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: ~/.cargo
key: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: ~/work/gtk-browser/gtk-browser/target
path: |
~/work/gtk-browser/gtk-browser/target
key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-
restore-keys: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Run Clippy
run: cargo clippy --all --tests -- -D warnings

fmt:
runs-on: ubuntu-24.04
needs: cache
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: ~/work/gtk-browser/gtk-browser/target
key: ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-
- name: Run fmt
run: cargo fmt --check --all
Loading

0 comments on commit a036d65

Please sign in to comment.