Specify ion-tests override for test-driver action to force 'main' as … #205
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test_amazon_linux: | |
name: ${{ format('Test ({0}, {1})', matrix.image, matrix.compiler.cc)}} | |
strategy: | |
# Run all jobs, even if one fails. This makes it easier to gather debugging info for various platforms. | |
fail-fast: false | |
matrix: | |
image: ['amazonlinux:1', 'amazonlinux:2'] | |
toolchain: [ "gcc", "clang" ] | |
include: | |
- image: amazonlinux:2 | |
toolchain: gcc | |
compiler: { cc: 'gcc', cxx: 'g++', packages: 'gcc gcc-c++' } | |
- image: amazonlinux:2 | |
toolchain: clang | |
compiler: { cc: 'clang', cxx: 'clang++', packages: 'clang gcc10-c++ compiler-rt' } | |
# amazonlinux:1's 'gcc'/'gcc-c++' packages install 4.8.5 which do not support C++14 which is needed | |
# by our googletest version. The clang package installs 3.6.2, which supports C++14, but does not support | |
# the sanitizers we want to use to capture issues during unit testing. | |
- image: amazonlinux:1 | |
toolchain: gcc | |
compiler: { cc: 'gcc', cxx: 'g++', packages: "gcc72 gcc72-c++" } | |
# Need to set the target for clang, since the default target it is configured with differs from the gcc target installed that it depends on. | |
- image: amazonlinux:1 | |
toolchain: clang | |
compiler: { cc: 'clang', cxx: 'clang++', packages: 'clang6.0', cxxflags: "-target x86_64-amazon-linux", cflags: "-target x86_64-amazon-linux" } | |
runs-on: ubuntu-latest | |
container: ${{ matrix.image }} | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
CFLAGS: ${{ matrix.compiler.cflags }} | |
CXXFLAGS: ${{ matrix.compiler.cxxflags }} | |
LDFLAGS: ${{ matrix.compiler.ldflags }} | |
UBSAN_OPTIONS: "print_stacktrace=1" | |
ASAN_OPTIONS: "halt_on_error=0" | |
# Tell GHA to force the use of node16. This will only work while node16 exists in the GHA runners, | |
# GitHub is moving to node20 (now default) and will eventually remove node16 entirely from the runner. | |
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
# Amazon Linux needs a newer version of git installed for actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
yum install which git make cmake3 -y | |
ln -s `which cmake3` /usr/bin/cmake | |
- name: Install ${{ matrix.compiler.cc }} | |
run: yum install ${{ matrix.compiler.packages }} -y | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-tags: true | |
fetch-depth: 50 # we need to be able to fetch the tag that is nearest to the current commit. | |
- name: Create git config # Fixes an issue where git refuses to work due to dubious permissions. | |
run: git config --system --add safe.directory $GITHUB_WORKSPACE | |
- name: Build Debug | |
run: ./build-debug.sh | |
- name: Test Debug | |
run: ./build/debug/test/all_tests | |
- name: Build Release | |
env: | |
CMAKE_FLAGS: -DIONC_BENCHMARKING_ENABLED=on | |
run: ./build-release.sh | |
- name: Test Release | |
run: ./build/release/test/all_tests | |
test_ubuntu_and_mac: | |
name: ${{ format('Test ({0}, {1})', matrix.image, matrix.toolchain)}} | |
strategy: | |
# Run all jobs, even if one fails. This makes it easier to gather debugging info for various platforms. | |
fail-fast: false | |
matrix: | |
image: ['macos-latest', 'ubuntu-latest'] | |
toolchain: ['gcc', 'clang'] | |
include: | |
- toolchain: clang | |
compiler: { cc: 'clang', cxx: 'clang++' } | |
- toolchain: gcc | |
compiler: { cc: 'gcc', cxx: 'g++' } | |
- image: 'macos-latest' | |
toolchain: gcc | |
compiler: { cc: 'gcc-11', cxx: 'g++-11' } | |
runs-on: ${{ matrix.image }} | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
CFLAGS: ${{ matrix.compiler.cflags }} | |
CXXFLAGS: ${{ matrix.compiler.cxxflags }} | |
LDFLAGS: ${{ matrix.compiler.ldflags }} | |
UBSAN_OPTIONS: "print_stacktrace=1" | |
ASAN_OPTIONS: "halt_on_error=0" | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-tags: true | |
fetch-depth: 50 | |
- name: Create git config # Fixes an issue where git refuses to work due to dubious permissions. | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Build Debug | |
id: build_debug | |
run: ./build-debug.sh | |
- name: Test Debug | |
run: ./build/debug/test/all_tests | |
- name: Build Release | |
id: build_release | |
run: ./build-release.sh | |
- name: Test Release | |
run: ./build/release/test/all_tests | |
documentation: | |
name: Generate Documentation | |
needs: | |
- test_ubuntu_and_mac | |
- test_amazon_linux | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Install Doxygen | |
run: sudo apt-get install doxygen -y | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Run Doxygen | |
run: doxygen ./Doxyfile | |
- name: Deploy to gh-pages | |
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }} | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: "./docs/html" |