Skip to content

Transition Azure Pipelines to Github Actions #22

Transition Azure Pipelines to Github Actions

Transition Azure Pipelines to Github Actions #22

Workflow file for this run

name: Build and Test
on:
pull_request:
push:
branches:
- main
# 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 :)
# Cancel previous jobs if an update has been made to the pull request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build_and_test:
runs-on: ubuntu-22.04
strategy:
matrix:
build_type: [ Debug, Release ]
config:
- host_config: [email protected]_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: [email protected]
compiler_image: seracllnl/tpls:clang-14_08-15-24_21h-49m
cmake_opts: "-DBUILD_SHARED_LIBS=ON"
- host_config: [email protected]
compiler_image: seracllnl/tpls:gcc-13_08-15-24_21h-49m
cmake_opts: "-DBUILD_SHARED_LIBS=ON"
include:
- build_type: Debug
config:
host_config: [email protected]
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: [email protected]
steps:
- name: Checkout Serac
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check ${{ matrix.check_type }}
run: ./scripts/github-actions/linux-check.sh