Skip to content

refactor hash table:insert -> try insert #177

refactor hash table:insert -> try insert

refactor hash table:insert -> try insert #177

Workflow file for this run

name: ci
on:
pull_request:
types: [ opened, reopened ]
push:
branches:
- '**' # every branches
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
compiler:
- llvm-18.0.0
- gcc-13
generator:
- "Ninja"
build_type:
- Release
- Debug
developer_mode:
- ON
- OFF
include:
# Set up preferred package generators, for given build configurations
- build_type: Release
developer_mode: OFF
package_generator: TBZ2
steps:
- uses: actions/checkout@v2
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
cmake: true
ninja: true
- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm
# make sure coverage is only enabled for Debug builds, since it sets -O0 to make sure coverage
# has meaningful results
- name: Configure CMake
run: |
cmake -S . -B ./build -G "${{matrix.generator}}" -DCPM_SOURCE_CACHE=~/cpm-cache -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DMCC_ENABLE_DEVELOPER_MODE:BOOL=${{matrix.developer_mode}} -DMCC_BUILD_TESTS:BOOL=ON -DGIT_SHA:STRING=${{ github.sha }}
- name: Build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build ./build --config ${{matrix.build_type}}
- name: Unit Tests
if: runner.os != 'Windows'
working-directory: ./build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ctest -C ${{matrix.build_type}} --output-on-failure
- run: rustup toolchain install stable --profile minimal
- name: Set Up Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "./tests/test_driver"
- name: End-to-End Tests
working-directory: ./tests/test_driver
run: |
cargo run --release -q -- --mcc ../../build/bin/mcc --base-folder ../test_data/