Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine coupling #37

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
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
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