From 32beb5ab91bcd7c33fceafec0600a3464ff4eed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=88zgu=CC=88r=20Akgu=CC=88n?= Date: Sat, 25 Nov 2023 21:13:07 +0000 Subject: [PATCH 1/4] test all crates at once - is this not simpler? --- .github/workflows/test.yml | 83 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..3e89fc56ea --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,83 @@ +name: "conjure-oxide" + +on: + push: + branches: + - main # run for pushes to the main branch. other branches need to create a PR if they want testing. + paths: + - conjure_oxide/** + - Cargo.* + - .github/workflows/test.yml + pull_request: + paths: + - conjure_oxide/** + - Cargo.* + - .github/workflows/test.yml + workflow_dispatch: + + +jobs: + + Job: + + strategy: + matrix: + rust_release: + - stable + - nightly + conjure_version: + - 2.5.1 + os: + - ubuntu-latest + - macos-latest + include: + - os: ubuntu-latest + release_suffix: linux + - os: macos-latest + release_suffix: macos-intel + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db + target + solvers/minion/vendor + solvers/chuffed/vendor + + key: ${{ runner.os }}-${{ matrix.rust_release }}-${{ github.event.repository.updated_at }} + restore-keys: ${{ runner.os }}-${{ matrix.rust_release }} + + - run: rustup update ${{ matrix.rust_release }} && rustup default ${{ matrix.rust_release }} + + - run: cargo build -vv + + - name: Add conjure to PATH + run: echo "${HOME}/.cargo/bin/conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers" >> ${GITHUB_PATH} + + - name: Install conjure + run: | + if [ "$(conjure --version | head -n2 | tail -n1)" == "Release version ${{ matrix.conjure_version }}" ]; then + echo "Found conjure, not fetching again." + else + echo "Did not find conjure, fetching." + pushd ~/.cargo/bin + rm -rf conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers* + wget https://github.com/conjure-cp/conjure/releases/download/v${{ matrix.conjure_version }}/conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers.zip + unzip conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers.zip + popd + fi + conjure --version + + - run: cargo install cargo-audit + + - run: cargo test + + - run: cargo audit From a430eabf229ab82b1142dcb922ee5a0d3259a0ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=88zgu=CC=88r=20Akgu=CC=88n?= Date: Sat, 25 Nov 2023 21:26:46 +0000 Subject: [PATCH 2/4] format --- Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e51faff18..a195dc458b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,9 @@ members = [ "conjure_oxide", "solvers/kissat", "solvers/minion", - "solvers/chuffed" + "solvers/chuffed", ] [workspace.lints.clippy] unwrap_used = "warn" expect_used = "warn" - - From 64949316407e545b406de83c16b6d512cf14b41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=88zgu=CC=88r=20Akgu=CC=88n?= Date: Sat, 25 Nov 2023 21:27:07 +0000 Subject: [PATCH 3/4] cargo audit is already installed --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e89fc56ea..396cc68ccd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,8 +75,6 @@ jobs: popd fi conjure --version - - - run: cargo install cargo-audit - run: cargo test From 9e2c1ee09a07fe66dc3d9f122852e1ce911b082c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=88zgu=CC=88r=20Akgu=CC=88n?= Date: Sat, 25 Nov 2023 21:37:35 +0000 Subject: [PATCH 4/4] remove the individual crate testers --- .github/workflows/chuffed.yml | 103 --------------------------------- .github/workflows/kissat.yml | 102 --------------------------------- .github/workflows/minion.yml | 105 ---------------------------------- .github/workflows/oxide.yml | 82 -------------------------- 4 files changed, 392 deletions(-) delete mode 100644 .github/workflows/chuffed.yml delete mode 100644 .github/workflows/kissat.yml delete mode 100644 .github/workflows/minion.yml delete mode 100644 .github/workflows/oxide.yml diff --git a/.github/workflows/chuffed.yml b/.github/workflows/chuffed.yml deleted file mode 100644 index 581e7614c3..0000000000 --- a/.github/workflows/chuffed.yml +++ /dev/null @@ -1,103 +0,0 @@ -# https://doc.rust-lang.org/cargo/guide/continuous-integration.html -# https://ectobit.com/blog/speed-up-github-actions-rust-pipelines/ -name: "solvers/chuffed" - -on: - workflow_dispatch: - push: - branches: - - main # run for pushes to the main branch - paths: - - solvers/chuffed/** - - Cargo.* - - .github/workflows/chuffed.yml - pull_request: - paths: - - solvers/chuffed/** - - Cargo.* - - .github/workflows/chuffed.yml - -env: - rust_release: stable - -jobs: - ubuntu: - name: "Chuffed: Ubuntu Build" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/chuffed - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/chuffed - run: cargo build -vv - - mac: - name: "Chuffed: Mac Build" - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/chuffed - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/chuffed - run: rustup target add aarch64-apple-darwin - - - working-directory: ./solvers/chuffed - run: cargo build -vv - - tests: - name: "Chuffed: Tests" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/chuffed - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/chuffed - run: cargo test diff --git a/.github/workflows/kissat.yml b/.github/workflows/kissat.yml deleted file mode 100644 index 4432a7e800..0000000000 --- a/.github/workflows/kissat.yml +++ /dev/null @@ -1,102 +0,0 @@ -# https://doc.rust-lang.org/cargo/guide/continuous-integration.html -# https://ectobit.com/blog/speed-up-github-actions-rust-pipelines/ -name: 'solvers/kissat' - -on: - push: - branches: - - main # run for pushes to the main branch - paths: - - solvers/kissat/** - - Cargo.* - - .github/workflows/kissat.yml - pull_request: - paths: - - solvers/kissat/** - - Cargo.* - - .github/workflows/kissat.yml - workflow_dispatch: - -env: - rust_release: stable - -jobs: - ubuntu: - name: 'Kissat: Ubuntu Build' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/kissat - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/kissat - run: cargo build -vv - - mac: - name: "Kissat: Mac Build" - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/kissat - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/kissat - run: rustup target add aarch64-apple-darwin - - - working-directory: ./solvers/kissat - run: cargo build -vv - - tests: - name: "Kissat: Tests" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/kissat - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/kissat - run: cargo test diff --git a/.github/workflows/minion.yml b/.github/workflows/minion.yml deleted file mode 100644 index 20b1fd0c94..0000000000 --- a/.github/workflows/minion.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: "solvers/minion" - -on: - push: - branches: - - main # run for pushes to the main branch - paths: - - solvers/minion/** - - Cargo.*" - - .github/workflows/minion.yml - pull_request: - paths: - - solvers/minion/** - - Cargo.* - - .github/workflows/minion.yml - workflow_dispatch: - -env: - rust_release: stable - -jobs: - ubuntu: - name: "Minion: Ubuntu Build" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/minion - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/minion - run: cargo build -vv - - mac: - name: "Minion: Mac Build" - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/minion - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - 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: 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 }}-${{ env.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ env.rust_release }}- - - - working-directory: ./solvers/minion - run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} - - - working-directory: ./solvers/minion - run: cargo test - - - - - diff --git a/.github/workflows/oxide.yml b/.github/workflows/oxide.yml deleted file mode 100644 index 9067e8e343..0000000000 --- a/.github/workflows/oxide.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: "conjure-oxide" - -on: - push: - branches: - - main # run for pushes to the main branch. other branches need to create a PR if they want testing. - paths: - - conjure_oxide/** - - Cargo.* - - .github/workflows/oxide.yml - pull_request: - paths: - - conjure_oxide/** - - Cargo.* - - .github/workflows/oxide.yml - workflow_dispatch: - - -jobs: - - Job: - - strategy: - matrix: - rust_release: - - stable - - nightly - conjure_version: - - 2.5.1 - os: - - ubuntu-latest - - macos-latest - include: - - os: ubuntu-latest - release_suffix: linux - - os: macos-latest - release_suffix: macos-intel - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v3 - - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - solvers/minion/vendor - solvers/chuffed/vendor - - key: ${{ runner.os }}-${{ matrix.rust_release }}-${{ github.event.repository.updated_at }} - restore-keys: ${{ runner.os }}-${{ matrix.rust_release }} - - - working-directory: ./conjure_oxide - run: rustup update ${{ matrix.rust_release }} && rustup default ${{ matrix.rust_release }} - - - working-directory: ./conjure_oxide - run: cargo build -vv - - - name: Add conjure to PATH - run: echo "${HOME}/.cargo/bin/conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers" >> ${GITHUB_PATH} - - - name: Install conjure - run: | - if [ "$(conjure --version | head -n2 | tail -n1)" == "Release version ${{ matrix.conjure_version }}" ]; then - echo "Found conjure, not fetching again." - else - echo "Did not find conjure, fetching." - pushd ~/.cargo/bin - rm -rf conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers* - wget https://github.com/conjure-cp/conjure/releases/download/v${{ matrix.conjure_version }}/conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers.zip - unzip conjure-v${{ matrix.conjure_version }}-${{ matrix.release_suffix }}-with-solvers.zip - popd - fi - conjure --version - - - working-directory: ./conjure_oxide - run: cargo test