Files
concrete/.github/workflows/optimizer.yml
2023-01-04 16:35:54 +01:00

94 lines
2.5 KiB
YAML

name: Continuous integration
on:
push:
branches: [ main, testci ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check-concrete-optimizer:
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- name: "Setup"
uses: ./.github/workflows/setup
with:
ssh_private_key: ${{ secrets.CONCRETE_COMPILER_CI_SSH_PRIVATE }}
- name: Formatting
run: cargo fmt --check
- name: Build
run: cargo build --release --all-targets
- name: Lint
run: cargo clippy --release --all-targets
- name: Tests
if: matrix.os == 'ubuntu-20.04'
run: |
cargo test --release --no-fail-fast --all-targets
make -C concrete-optimizer-cpp test-ci
benchmark-concrete-optimizer:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Setup"
uses: ./.github/workflows/setup
with:
ssh_private_key: ${{ secrets.CONCRETE_COMPILER_CI_SSH_PRIVATE }}
- name: Run benchmark
run: cargo bench -p v0-parameters -- --output-format bencher | tee bench_result.txt
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: bench_result.txt
external-data-json-path: ./cache/benchmark-data.json
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Enable alert commit comment
comment-always: true
nightly-check-concrete-optimizer:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- name: Rust install
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
# A SSH private key is required as some dependencies are from private repos
- name: Set ssh keys
uses: webfactory/ssh-agent@v0.6.0
with:
ssh-private-key: ${{ secrets.CONCRETE_COMPILER_CI_SSH_PRIVATE }}
- name: Formatting
run: cargo fmt --check
- name: Lint
run: cargo clippy --release --all-targets