Transition Azure Pipelines to Github Actions #17
Workflow file for this run
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: pull_request | |
# TODO USE vars context FOR STORING COMPILER_IMAGE | |
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#vars-context | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 4 | |
matrix: | |
build_type: [ Debug, Release ] | |
config: | |
- host_config: gcc@12.3.0_cuda.cmake | |
compiler_image: seracllnl/tpls:cuda-12_08-15-24_21h-49m | |
cmake_opts: "-DBUILD_SHARED_LIBS=ON -DENABLE_WARNINGS_AS_ERRORS=OFF" | |
build_src_opts: "--skip-install --skip-tests" | |
- host_config: clang@14.0.0.cmake | |
compiler_image: seracllnl/tpls:clang-14_08-15-24_21h-49m | |
cmake_opts: "-DBUILD_SHARED_LIBS=ON" | |
- host_config: gcc@13.1.0.cmake | |
compiler_image: seracllnl/tpls:gcc-13_08-15-24_21h-49m | |
cmake_opts: "-DBUILD_SHARED_LIBS=ON" | |
include: | |
- build_type: Debug | |
config: | |
host_config: clang@14.0.0.cmake | |
compiler_image: seracllnl/tpls:clang-14_08-15-24_21h-49m | |
cmake_opts: "-DSERAC_ENABLE_CODEVELOP=ON" | |
container: | |
image: ${{ matrix.config.compiler_image }} | |
volumes: | |
- /home/serac/serac | |
steps: | |
- name: Checkout Serac | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Print Matrix Variables | |
run: | | |
echo "build_src_opts ${{ matrix.config.build_src_opts }}" | |
echo "build_type ${{ matrix.build_type }}" | |
echo "cmake_opts ${{ matrix.config.cmake_opts }}" | |
echo "compiler_image ${{ matrix.config.compiler_image }}" | |
echo "host_config ${{ matrix.config.host_config }}" | |
- name: Build and Test ${{ matrix.config.host_config }} ${{ matrix.build_type }} | |
timeout-minutes: 30 | |
run: | | |
./scripts/llnl/build_src.py ${{ matrix.config.build_src_opts }} \ | |
--verbose \ | |
--host-config ${{ matrix.config.host_config }} \ | |
--extra-cmake-options "${{ matrix.config.cmake_opts }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}" \ | |
--jobs 4 | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test Results ${{ matrix.config.host_config }} ${{ matrix.build_type }} ${{ matrix.config.cmake_opts }} | |
path: "**/Test.xml" | |
if-no-files-found: ignore | |
check_code: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
check_type: [coverage, docs, style, header] | |
container: | |
image: seracllnl/tpls:clang-14_08-15-24_21h-49m | |
volumes: | |
- /home/serac/serac | |
env: | |
CHECK_TYPE: ${{ matrix.check_type }} | |
HOST_CONFIG: clang@14.0.0.cmake | |
steps: | |
- name: Checkout Serac | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# TODO DO WE NEED THIS? | |
- name: Set Codecov Environment Variable | |
if: ${{ matrix.check_type == 'coverage' }} | |
run: export ci_env=$(bash <(curl -s https://codecov.io/env)) | |
- name: Check ${{ matrix.check_type }} | |
run: ./scripts/github-actions/linux-check.sh |