Skip to content

fix(deps): update all dependencies #554

fix(deps): update all dependencies

fix(deps): update all dependencies #554

Workflow file for this run

name: Rust CI
on:
push:
branches:
- main # Run on pushes to `main`
- dev # Run on pushes to `dev`
paths:
- 'gbf_core/**'
- 'gbf_suite/**'
- 'gbf_macros/**'
- 'scripts/**'
pull_request:
branches:
- main # Run on pull requests targeting `main`
- dev # Run on pull requests targeting `dev`
paths:
- 'gbf_core/**'
- 'gbf_suite/**'
- 'gbf_macros/**'
- 'scripts/**'
workflow_call:
jobs:
# Add a job to run the CI script
rust-tests-code-coverage:
name: Run Rust Tests and Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt, clippy
# https://stackoverflow.com/questions/78629554/how-to-cache-cargo-packages-in-the-github-ci-workflow
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run CI script
run: IS_CI=true ./scripts/pre-commit.sh
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: codecov.json
# Add a job to run the version check script
version-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Python and install dependencies
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
- run: pip install -r ./scripts/requirements.txt
- name: Run version checks
run: python ./scripts/version.py
# Add a job to run the GBF Suite
gbf-suite:
name: GBF Suite
needs: [version-check]
runs-on: ubuntu-latest
steps:
# Step 1: Checkout Repository
- name: Checkout Repository
uses: actions/checkout@v6
# Step 2: Configure AWS Credentials (if needed for external storage)
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
# Step 3: Install Rust
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
# https://stackoverflow.com/questions/78629554/how-to-cache-cargo-packages-in-the-github-ci-workflow
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
# Step 4: Run GBF Suite
- name: Run GBF Suite
env:
GBF_SUITE_DIR: ./gbf_core/tests/gs2bc/
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
export GBF_VERSION="pr-${{ github.event.pull_request.number }}"
fi
cargo run --package gbf_suite