Skip to content

Merge pull request #174 from gskorokhod/xyz-minion #10

Merge pull request #174 from gskorokhod/xyz-minion

Merge pull request #174 from gskorokhod/xyz-minion #10

Workflow file for this run

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/**
- solvers/**
- crates/**
- Cargo.*
- .github/workflows/test.yml
pull_request:
paths:
- conjure_oxide/**
- solvers/**
- crates/**
- Cargo.*
- .github/workflows/test.yml
workflow_dispatch:
jobs:
build-and-test:
name: "Build and Test"
strategy:
# run all combinations of the matrix even if one combination fails.
fail-fast: false
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 --workspace
- 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 test --workspace
audit:
name: "Dependency Audit"
runs-on: ubuntu-latest
strategy:
# run all combinations of the matrix even if one combination fails.
fail-fast: false
matrix:
rust_release:
- stable
- nightly
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.rust_release }} && rustup default ${{ matrix.rust_release }}
- run: cargo audit