diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 25d11c74..8c5b5cf1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 < ~/.cargo/config.toml + [registries] + gosub = { index = \"sparse+https://registry.gosub.io/\"" } + EOF - name: Build run: cargo build --verbose --all --all-features - name: Clean @@ -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 @@ -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 < ~/.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 @@ -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 < ~/.cargo/config.toml + [registries] + gosub = { index = \"sparse+https://registry.gosub.io/\"" } + EOF - name: Run Clippy run: cargo clippy --all --tests -- -D warnings @@ -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 < ~/.cargo/config.toml + [registries] + gosub = { index = \"sparse+https://registry.gosub.io/\"" } + EOF - name: Run fmt run: cargo fmt --check --all