Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Dec 27, 2024
1 parent 88f83cd commit a31440a
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-
- name: Add Gosub crate registry
run: |
cat <<EOF > ~/.cargo/config.toml
[registries]
gosub = { index = \"sparse+https://registry.gosub.io/\"" }
EOF
- name: Build
run: cargo build --verbose --all --all-features
- name: Clean
Expand All @@ -58,8 +64,6 @@ jobs:
# rust_version: [ stable, beta, nightly, 1.73.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 sqlite3 libsqlite3-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev libgtk-4-dev -y
Expand All @@ -80,6 +84,12 @@ jobs:
key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-
- name: Add Gosub crate registry
run: |
cat <<EOF > ~/.cargo/config.toml
[registries]
gosub = { index = \"sparse+https://registry.gosub.io/\"" }
EOF
- name: Run tests
run: cargo test --verbose --all --no-fail-fast --all-features --all-targets

Expand Down Expand Up @@ -113,6 +123,12 @@ jobs:
key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-
- name: Add Gosub crate registry
run: |
cat <<EOF > ~/.cargo/config.toml
[registries]
gosub = { index = \"sparse+https://registry.gosub.io/\"" }
EOF
- name: Run Clippy
run: cargo clippy --all --tests -- -D warnings

Expand All @@ -129,11 +145,17 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-
- name: Cache cargo build
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: ~/work/gosub-engine/gosub-engine/target
key: ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-
- name: Add Gosub crate registry
run: |
cat <<EOF > ~/.cargo/config.toml
[registries]
gosub = { index = \"sparse+https://registry.gosub.io/\"" }
EOF
- name: Run fmt
run: cargo fmt --check --all

0 comments on commit a31440a

Please sign in to comment.