diff --git a/.github/workflows/chuffed-tests.yml b/.github/workflows/chuffed.yml similarity index 52% rename from .github/workflows/chuffed-tests.yml rename to .github/workflows/chuffed.yml index e55c5b7771..3313643d84 100644 --- a/.github/workflows/chuffed-tests.yml +++ b/.github/workflows/chuffed.yml @@ -2,6 +2,7 @@ # https://ectobit.com/blog/speed-up-github-actions-rust-pipelines/ name: "solvers/chuffed" on: + workflow_dispatch: push: paths: - "solvers/chuffed/**" @@ -10,22 +11,20 @@ on: paths: - "solvers/chuffed/**" - "Cargo.*" - workflow_dispatch: jobs: ubuntu: - name: "solvers/chuffed: Ubuntu Build" + name: "Chuffed: Ubuntu Build" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - # https://stackoverflow.com/questions/32327108/get-the-current-commit-id-of-specified-submodule - # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable - - name: Get chuffed hash for cache invalidation - id: chuffed-cache + - name: Generate caching variables + id: cache-vars run: | - echo "chuffed_sha=$(git rev-parse HEAD:solvers/chuffed/vendor)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" - name: Set up cache uses: actions/cache@v3 @@ -37,9 +36,9 @@ jobs: ~/.cargo/git/db/ target/ solvers/chuffed/vendor - key: ${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match chuffed exactly, cargo inexactly - restore-keys: ${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha}}-cargo- + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- - working-directory: ./solvers/chuffed run: rustup update stable && rustup default stable @@ -48,15 +47,16 @@ jobs: run: cargo build -vv mac: - name: "solvers/chuffed: Mac Build" + name: "Chuffed: Mac Build" runs-on: macos-latest steps: - uses: actions/checkout@v2 - - name: Get chuffed hash for cache invalidation - id: chuffed-cache + - name: Generate caching variables + id: cache-vars run: | - echo "chuffed_sha=$(git rev-parse HEAD:solvers/chuffed/vendor)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" - name: Set up cache uses: actions/cache@v3 @@ -68,9 +68,9 @@ jobs: ~/.cargo/git/db/ target/ solvers/chuffed/vendor - key: ${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match chuffed exactly, cargo inexactly - restore-keys: ${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha}}-cargo- + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- - working-directory: ./solvers/chuffed run: rustup update stable && rustup default stable @@ -82,17 +82,19 @@ jobs: run: cargo build -vv tests: - name: "solvers/chuffed: Tests" + name: "Chuffed: Tests" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - # https://stackoverflow.com/questions/32327108/get-the-current-commit-id-of-specified-submodule - # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable - - name: Get chuffed hash for cache invalidation - id: chuffed-cache + - name: Generate caching variables + id: cache-vars run: | - echo "chuffed_sha=$(git rev-parse HEAD:solvers/chuffed/vendor)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + + echo "cache_paths=$(./etc/ci/get_caching_paths.sh)" >> "$GITHUB_OUTPUT" + echo "cache_paths=$(./etc/ci/get_caching_paths.sh)" - name: Set up cache uses: actions/cache@v3 @@ -104,9 +106,9 @@ jobs: ~/.cargo/git/db/ target/ solvers/chuffed/vendor - key: ${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match chuffed exactly, cargo inexactly - restore-keys: ${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha}}-cargo- + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- - working-directory: ./solvers/chuffed run: rustup update stable && rustup default stable diff --git a/.github/workflows/coverage.yml b/.github/workflows/code-coverage.yml similarity index 84% rename from .github/workflows/coverage.yml rename to .github/workflows/code-coverage.yml index 0f6176a8c6..c099eaf25f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -1,4 +1,4 @@ -name: 'Info: Code Coverage' +name: 'Code Coverage' on: push: pull_request: @@ -10,7 +10,7 @@ permissions: jobs: coverage: - name: "Coverage Report" + name: "Info: Code Coverage Reports" # only do coverage for ready PRs if: ${{ github.event != 'pull_request' || ( github.event == 'pull_request' && (! github.event.pull_request.draft)) }} runs-on: ubuntu-latest @@ -18,25 +18,25 @@ jobs: - name: Checkout the repository uses: actions/checkout@v2 - - name: Get submodule hashes for cache invalidation - id: cache-hashes + - name: Generate caching variables + id: cache-vars run: | - echo "shas=$(git rev-parse HEAD:solvers/minion/vendor)-$(git rev-parse HEAD:solvers/chuffed/vendor)" - echo "shas=$(git rev-parse HEAD:solvers/minion/vendor)-$(git rev-parse HEAD:solvers/chuffed/vendor)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" - name: Set up cache uses: actions/cache@v3 with: - path: | + path: ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ solvers/minion/vendor - solvers/chuffed/vendor - key: nightly-${{ runner.os }}-solvers-${{ steps.cache-hashes.outputs.shas }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: nightly-${{ runner.os }}-solvers-${{ steps.cache-hashes.outputs.shas }}-cargo- + + key: nightly-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: nightly-${{ runner.os }}-gitmodules- - name: Install rust nightly working-directory: ./solvers/minion @@ -66,7 +66,7 @@ jobs: branch: gh-pages commit-message: "Actions: Code Coverage for ${{ github.sha }}" - - name: Update latest code coverage if on main. + - name: If on main branch, copy coverage report to /latest. if: github.ref == 'refs/heads/main' uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/.github/workflows/doc-coverage.yml b/.github/workflows/doc-coverage.yml index 31010e4c2c..b4c3a8c863 100644 --- a/.github/workflows/doc-coverage.yml +++ b/.github/workflows/doc-coverage.yml @@ -1,4 +1,4 @@ -name: 'Info: Documentation Coverage' +name: "Documentation Coverage" on: push: pull_request: @@ -6,16 +6,16 @@ on: jobs: minion: - name: 'Minion' + name: 'Info: Doc Coverage Report for Minion' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - - name: Get minion hash for cache invalidation - id: minion-cache + - name: Generate caching variables + id: cache-vars run: | - echo "minion_sha=$(git rev-parse HEAD:solvers/minion/vendor)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" - name: Set up cache uses: actions/cache@v3 @@ -27,8 +27,9 @@ jobs: ~/.cargo/git/db/ target/ solvers/minion/vendor - key: nightly-${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: nightly-${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha}}-cargo- + + key: nightly-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: nightly-${{ runner.os }}-gitmodules- - name: Use nightly run: rustup update nightly && rustup default nightly @@ -41,15 +42,16 @@ jobs: echo '```' >> $GITHUB_STEP_SUMMARY chuffed: - name: 'Chuffed' + name: 'Info: Doc Coverage Report for Chuffed' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Get chuffed hash for cache invalidation - id: chuffed-cache + - name: Generate caching variables + id: cache-vars run: | - echo "chuffed_sha=$(git rev-parse HEAD:solvers/chuffed/vendor)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" - name: Set up cache uses: actions/cache@v3 @@ -61,9 +63,9 @@ jobs: ~/.cargo/git/db/ target/ solvers/chuffed/vendor - key: nightly-${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match chuffed exactly, cargo inexactly - restore-keys: nightly-${{ runner.os }}-chuffed-${{ steps.chuffed-cache.outputs.chuffed_sha}}-cargo- + + key: nightly-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: nightly-${{ runner.os }}-gitmodules- - name: Use nightly run: rustup update nightly && rustup default nightly @@ -76,11 +78,17 @@ jobs: echo '```' >> $GITHUB_STEP_SUMMARY conjure-oxide: - name: 'Conjure Oxide' + name: 'Info: Doc Coverage Report for Conjure Oxide' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + - name: Set up cache uses: actions/cache@v3 with: @@ -89,11 +97,12 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - ~/solvers/minion/vendor - ~/solvers/chuffed/vendor target/ - key: nightly-conjureoxide-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: nightly-conjureoxide-${{ runner.os }}-cargo + solvers/chuffed/vendor + solvers/minion/vendor + + key: nightly-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: nightly-${{ runner.os }}-gitmodules- - name: Use nightly run: rustup update nightly && rustup default nightly diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/format.yml similarity index 66% rename from .github/workflows/rustfmt.yml rename to .github/workflows/format.yml index 8c5712c535..2b9bfd0aef 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/format.yml @@ -1,20 +1,18 @@ # see: https://github.com/marketplace/actions/rust-rustfmt-check -name: rustfmt +name: "Formatting" on: pull_request: - -permissions: - pull-requests: write + push: jobs: - format: + rust: + name: "Check Rust Formatting" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - name: Check rust formatting - run: cargo fmt --check + - run: cargo fmt --check diff --git a/.github/workflows/kissat-tests.yml b/.github/workflows/kissat.yml similarity index 57% rename from .github/workflows/kissat-tests.yml rename to .github/workflows/kissat.yml index c493f6b63c..5cc1ffd907 100644 --- a/.github/workflows/kissat-tests.yml +++ b/.github/workflows/kissat.yml @@ -3,9 +3,6 @@ name: 'solvers/kissat' on: push: - paths: - - 'solvers/kissat/**' - - "Cargo.*" pull_request: paths: - 'solvers/kissat/**' @@ -14,11 +11,17 @@ on: jobs: ubuntu: - name: 'solvers/kissat: Ubuntu Build' + name: 'Kissat: Ubuntu Build' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + - name: Set up cache uses: actions/cache@v3 with: @@ -28,8 +31,9 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- - working-directory: ./solvers/kissat run: rustup update stable && rustup default stable @@ -38,11 +42,17 @@ jobs: run: cargo build -vv mac: - name: 'solvers/kissat: Mac Build' + name: "Kissat: Mac Build" runs-on: macos-latest steps: - uses: actions/checkout@v2 + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + - name: Set up cache uses: actions/cache@v3 with: @@ -52,8 +62,9 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- - working-directory: ./solvers/kissat run: rustup update stable && rustup default stable @@ -65,11 +76,17 @@ jobs: run: cargo build -vv tests: - name: 'solvers/kissat: Tests' + name: "Kissat: Tests" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + - name: Set up cache uses: actions/cache@v3 with: @@ -79,8 +96,9 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- - working-directory: ./solvers/kissat run: rustup update stable && rustup default stable diff --git a/.github/workflows/minion-tests.yml b/.github/workflows/minion-tests.yml deleted file mode 100644 index c08b7252be..0000000000 --- a/.github/workflows/minion-tests.yml +++ /dev/null @@ -1,119 +0,0 @@ -# https://doc.rust-lang.org/cargo/guide/continuous-integration.html -# https://ectobit.com/blog/speed-up-github-actions-rust-pipelines/ -name: 'solvers/minion' -on: - push: - paths: - - 'solvers/minion/**' - - "Cargo.*" - pull_request: - paths: - - 'solvers/minion/**' - - "Cargo.*" - workflow_dispatch: - -jobs: - ubuntu: - name: 'solvers/minion: Ubuntu Build' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # https://stackoverflow.com/questions/32327108/get-the-current-commit-id-of-specified-submodule - # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable - - name: Get minion hash for cache invalidation - id: minion-cache - run: | - echo "minion_sha=$(git rev-parse HEAD:solvers/minion/vendor)" >> "$GITHUB_OUTPUT" - - - name: Set up cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - solvers/minion/vendor - key: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match minion exactly, cargo inexactly - restore-keys: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha}}-cargo- - - - working-directory: ./solvers/minion - run: rustup update stable && rustup default stable - - - working-directory: ./solvers/minion - run: cargo build -vv - - mac: - name: 'solvers/minion: Mac Build' - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - name: Get minion hash for cache invalidation - id: minion-cache - run: | - echo "minion_sha=$(git rev-parse HEAD:solvers/minion/vendor)" >> "$GITHUB_OUTPUT" - - - name: Set up cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - solvers/minion/vendor - key: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match minion exactly, cargo inexactly - restore-keys: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha}}-cargo- - - - working-directory: ./solvers/minion - run: rustup update stable && rustup default stable - - - working-directory: ./solvers/minion - run: rustup target add aarch64-apple-darwin - - - working-directory: ./solvers/minion - run: cargo build -vv - - tests: - name: 'solvers/minion: Tests' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # https://stackoverflow.com/questions/32327108/get-the-current-commit-id-of-specified-submodule - # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable - - name: Get minion hash for cache invalidation - id: minion-cache - run: | - echo "minion_sha=$(git rev-parse HEAD:solvers/minion/vendor)" >> "$GITHUB_OUTPUT" - - - name: Set up cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - solvers/minion/vendor - key: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # match minion exactly, cargo inexactly - restore-keys: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha}}-cargo- - - - working-directory: ./solvers/minion - run: rustup update stable && rustup default stable - - - working-directory: ./solvers/minion - run: cargo test -- --test-threads=1 - - - - - diff --git a/.github/workflows/minion.yml b/.github/workflows/minion.yml new file mode 100644 index 0000000000..b84894d956 --- /dev/null +++ b/.github/workflows/minion.yml @@ -0,0 +1,115 @@ +name: "solvers/minion" +on: + push: + paths: + - 'solvers/minion/**' + - "Cargo.*" + pull_request: + paths: + - 'solvers/minion/**' + - "Cargo.*" + workflow_dispatch: + +jobs: + ubuntu: + name: "Minion: Ubuntu Build" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + + - name: Set up cache + uses: actions/cache@v3 + with: + path: + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + solvers/minion/vendor + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- + + - working-directory: ./solvers/minion + run: rustup update stable && rustup default stable + + - working-directory: ./solvers/minion + run: cargo build -vv + + mac: + name: "Minion: Mac Build" + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + + - name: Set up cache + uses: actions/cache@v3 + with: + path: + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + solvers/minion/vendor + + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- + + - working-directory: ./solvers/minion + run: rustup update stable && rustup default stable + + - working-directory: ./solvers/minion + run: rustup target add aarch64-apple-darwin + + - working-directory: ./solvers/minion + run: cargo build -vv + + tests: + name: "Minion: Tests" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Generate caching variables + id: cache-vars + run: | + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" >> "$GITHUB_OUTPUT" + echo -e "submodule_sha=$(./etc/ci/get_submodules_hash.sh)" + + - name: Set up cache + uses: actions/cache@v3 + with: + path: + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + solvers/minion/vendor + key: stable-${{ runner.os }}-gitmodules-${{ steps.cache-vars.outputs.submodule_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: stable-${{ runner.os }}-gitmodules- + + - working-directory: ./solvers/minion + run: rustup update stable && rustup default stable + + - working-directory: ./solvers/minion + run: cargo test -- --test-threads=1 + + + + + diff --git a/etc/ci/get_caching_paths.sh b/etc/ci/get_caching_paths.sh deleted file mode 100755 index 8a35e8fee7..0000000000 --- a/etc/ci/get_caching_paths.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh - -# get_caching_paths.sh -# -# get the paths to be cached by Github Actions. -# paths are seperated by new lines - -sh get_submodule_paths.sh -echo '~/.cargo/bin' -echo '~/.cargo/registry/index' -echo '~/.cargo/registry/cache' -echo '~/.cargo/git/db' -echo 'target/' diff --git a/etc/ci/get_submodules_hash.sh b/etc/ci/get_submodules_hash.sh index 337949535c..fa5aed8526 100755 --- a/etc/ci/get_submodules_hash.sh +++ b/etc/ci/get_submodules_hash.sh @@ -11,7 +11,7 @@ CI_SCRIPTS_DIR=$(realpath $(dirname "$0")) # go to top level of git repo cd $(git rev-parse --show-toplevel) -git submodule update --init --recursive +git submodule update --init --recursive 1>&2 2>/dev/null { for module in $(sh "$CI_SCRIPTS_DIR/get_submodule_paths.sh") @@ -19,4 +19,3 @@ git submodule update --init --recursive git rev-parse "HEAD:$module" >> $SHAS done; } 2>/dev/null | sha256sum | head -c 40 # note: sha256sum print a - at the end - this is removed here. -echo ''