Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5a85cb6
Transition Azure Pipelines to Github Actions
chapman39 Dec 6, 2024
5e8b96a
fix `on` section
chapman39 Dec 6, 2024
61d58ca
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 Dec 9, 2024
4b3a080
try and set containers
chapman39 Dec 9, 2024
7a3c286
disable azure pipelines
chapman39 Dec 9, 2024
96b6fb6
testing volumes
chapman39 Dec 9, 2024
800953e
use home
chapman39 Dec 9, 2024
c1f52a6
disable LC temp
chapman39 Dec 9, 2024
4c3592f
removing home
chapman39 Dec 9, 2024
a16936b
try again
chapman39 Dec 9, 2024
a2e417c
matrix attempt 1
chapman39 Dec 9, 2024
a051980
matrix attempt 2
chapman39 Dec 9, 2024
bf3998e
matrix attempt 3
chapman39 Dec 9, 2024
6fcca0c
upload test results
chapman39 Dec 9, 2024
9bc159e
add only one codevelop job
chapman39 Dec 9, 2024
3a59830
fix codevelop
chapman39 Dec 9, 2024
c1b8f10
fix codevelop 2
chapman39 Dec 9, 2024
1d191a8
add github action badge
chapman39 Dec 10, 2024
168eee4
temp print github vars
chapman39 Dec 10, 2024
3f43562
unique artifact name
chapman39 Dec 10, 2024
2eb41ac
add code checks
chapman39 Dec 10, 2024
a73d47a
fix path
chapman39 Dec 10, 2024
3360934
remove section
chapman39 Dec 10, 2024
427c9d0
fix code checks, cancel previous pipelines automatically
chapman39 Dec 10, 2024
d5181b4
testing concurrency
chapman39 Dec 10, 2024
5914ed9
bye azure pipelines
chapman39 Dec 10, 2024
8548a43
remove `max-parallel`
chapman39 Dec 10, 2024
fc5c3ca
skip install on codevelop
chapman39 Dec 10, 2024
9b9c4b0
re-add lc ci
chapman39 Dec 10, 2024
b5e6738
implement hacky way to store docker image names at top of file
chapman39 Dec 10, 2024
4608806
clarify vars
chapman39 Dec 10, 2024
d868059
consistent _
chapman39 Dec 10, 2024
b0ade36
minor docs update
chapman39 Dec 10, 2024
b6a1890
Merge branch 'develop' into feature/chapman39/azure-to-github-actions
chapman39 Dec 11, 2024
9cd0b27
rename to "unit tests"
chapman39 Dec 11, 2024
7f19743
Update .github/workflows/unit-tests.yml
chapman39 Dec 16, 2024
d77b3af
Update .github/workflows/unit-tests.yml
chapman39 Dec 16, 2024
27cf804
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 Dec 17, 2024
a932b9f
rename to ci tests, only upload test results if non-cuda build
chapman39 Dec 17, 2024
22eb85e
fix small mistake
chapman39 Dec 17, 2024
9a9855e
Merge branch 'develop' into feature/chapman39/azure-to-github-actions
chapman39 Dec 17, 2024
892072e
add comment on skipping upload tests
chapman39 Dec 17, 2024
74bdc43
Merge branch 'develop' into feature/chapman39/azure-to-github-actions
chapman39 Dec 26, 2024
6f433d4
Merge branch 'develop' into feature/chapman39/azure-to-github-actions
chapman39 Dec 30, 2024
c6c2651
Merge branch 'develop' into feature/chapman39/azure-to-github-actions
tupek2 Dec 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI Tests

on:
pull_request:
push:
branches:
- develop

# 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/develop' }}

env:
CLANG_DOCKER_IMAGE: seracllnl/tpls:clang-14_08-15-24_21h-49m
CUDA_DOCKER_IMAGE: seracllnl/tpls:cuda-12_08-15-24_21h-49m
GCC_DOCKER_IMAGE: seracllnl/tpls:gcc-13_08-15-24_21h-49m

jobs:
# Hacky solution to reference env variables outside of `run` steps https://stackoverflow.com/a/74217028
set_image_vars:
runs-on: ubuntu-latest
steps:
- name: Do Nothing
run: echo
outputs:
clang_docker_image: ${{ env.CLANG_DOCKER_IMAGE }}
cuda_docker_image: ${{ env.CUDA_DOCKER_IMAGE }}
gcc_docker_image: ${{ env.GCC_DOCKER_IMAGE }}
build_and_test:
runs-on: ubuntu-22.04
needs:
- set_image_vars
strategy:
matrix:
build_type: [ Debug, Release ]
config:
- host_config: [email protected]
compiler_image: ${{ needs.set_image_vars.outputs.clang_docker_image }}
cmake_opts: "-DBUILD_SHARED_LIBS=ON"
- host_config: [email protected]_cuda.cmake
compiler_image: ${{ needs.set_image_vars.outputs.cuda_docker_image }}
cmake_opts: "-DBUILD_SHARED_LIBS=ON -DENABLE_WARNINGS_AS_ERRORS=OFF"
build_src_opts: "--skip-install --skip-tests"
- host_config: [email protected]
compiler_image: ${{ needs.set_image_vars.outputs.gcc_docker_image }}
cmake_opts: "-DBUILD_SHARED_LIBS=ON"
include:
- build_type: Debug
config:
host_config: [email protected]
compiler_image: ${{ needs.set_image_vars.outputs.clang_docker_image }}
cmake_opts: "-DSERAC_ENABLE_CODEVELOP=ON"
build_src_opts: "--skip-install"
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
# CUDA containers do not run tests, because runners don't have GPUs, so skip upload in that case
if: ${{ matrix.config.compiler_image != needs.set_image_vars.outputs.cuda_docker_image }}
uses: actions/upload-artifact@v4
with:
name: Test Results ${{ matrix.config.host_config }} ${{ matrix.build_type }} ${{ matrix.config.cmake_opts }}
path: "**/Test.xml"
check_code:
runs-on: ubuntu-22.04
needs:
- set_image_vars
strategy:
matrix:
check_type: [coverage, docs, style, header]
container:
image: ${{ needs.set_image_vars.outputs.clang_docker_image }}
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# <img src="/share/serac/logo/serac-logo-blue.png?raw=true" width="150" alt="Serac"/>

[![Build
Status](https://dev.azure.com/llnl-serac/serac/_apis/build/status/LLNL.serac?branchName=develop)](https://dev.azure.com/llnl-serac/serac/_build/latest?definitionId=1&branchName=develop)
[![Build Status](https://github.com/LLNL/serac/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/LLNL/serac/actions/workflows/unit-tests.yml)
[![Documentation Status](https://readthedocs.org/projects/serac/badge/?version=latest)](https://serac.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/LLNL/serac/branch/develop/graph/badge.svg?token=DO4KFMPNM0)](https://codecov.io/gh/LLNL/serac)
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](./LICENSE)
Expand Down
133 changes: 0 additions & 133 deletions azure-pipelines.yml

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/azure-pipelines/DummyTest.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,19 @@ function or_die () {
fi
}

or_die cd serac
git submodule init
git submodule update

echo HOST_CONFIG
echo $HOST_CONFIG

echo "~~~~~~ RUNNING CMAKE ~~~~~~~~"
cmake_args="-DENABLE_CLANGTIDY=OFF -DSERAC_ENABLE_CODE_CHECKS=ON"

if [[ "$DO_COVERAGE_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "coverage" ]] ; then
# Alias llvm-cov to gcov so it acts like gcov
ln -s `which llvm-cov` /home/serac/gcov
cmake_args="$cmake_args -DENABLE_COVERAGE=ON -DGCOV_EXECUTABLE=/home/serac/gcov"
fi

if [[ "$DO_DOCS_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "docs" ]] ; then
SPHINX_EXECUTABLE=/usr/bin/sphinx-build
if [[ ! -f "$SPHINX_EXECUTABLE" ]]; then
echo "sphinx not found: $SPHINX_EXECUTABLE"
Expand All @@ -47,7 +43,7 @@ if [[ "$DO_DOCS_CHECK" == "yes" ]] ; then
cmake_args="$cmake_args -DENABLE_DOCS=ON -DSPHINX_EXECUTABLE=$SPHINX_EXECUTABLE -DDOXYGEN_EXECUTABLE=$DOXYGEN_EXECUTABLE"
fi

if [[ "$DO_STYLE_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "style" ]] ; then
CLANGFORMAT_EXECUTABLE=/usr/bin/clang-format
if [[ ! -f "$CLANGFORMAT_EXECUTABLE" ]]; then
echo "clang-format not found: $CLANGFORMAT_EXECUTABLE"
Expand All @@ -59,24 +55,24 @@ fi
or_die ./config-build.py -hc host-configs/docker/${HOST_CONFIG} -bp build-check-debug -ip install-check-debug $cmake_args
or_die cd build-check-debug

if [[ "$DO_COVERAGE_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "coverage" ]] ; then
or_die make -j4
or_die make serac_coverage
# Rename to file expected by codecov
cp serac_coverage.info.cleaned lcov.info
or_die curl -s https://codecov.io/bash | bash /dev/stdin -X gcov
fi

if [[ "$DO_DOCS_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "docs" ]] ; then
or_die make VERBOSE=1 docs 2>&1 | tee docs_output
or_die ../scripts/check_log.py -l docs_output -i ../scripts/azure-pipelines/docs_ignore_regexs.txt
or_die ../scripts/check_log.py -l docs_output -i ../scripts/github-actions/docs_ignore_regexs.txt
fi

if [[ "$DO_STYLE_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "style" ]] ; then
or_die make VERBOSE=1 clangformat_check
fi

if [[ "$DO_HEADER_CHECK" == "yes" ]] ; then
if [[ "$CHECK_TYPE" == "header" ]] ; then
or_die make -j4
or_die make install -j4
or_die ../scripts/check_for_missing_headers.py -i ../install-check-debug -s ../src
Expand Down
2 changes: 1 addition & 1 deletion scripts/llnl/build_src.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def parse_args():
action="store_true",
dest="skip_tests",
default=False,
help="Skip unit tests which will not work in some configurations (CUDA on Azure)")
help="Skip unit tests which will not work in some configurations (e.g. CUDA on GitHub Actions)")
parser.add_argument("-v", "--verbose",
action="store_true",
dest="verbose",
Expand Down
4 changes: 0 additions & 4 deletions scripts/llnl/common_build_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ def build_and_test_host_config(test_root, host_config, report_to_stdout=False, e
print("[ERROR: Tests for host-config: %s failed]\n" % host_config)
return res
else:
# Copy dummy .xml file to avoid Azure CI warning when not running tests
dummy_ctest_src = pjoin(get_repo_dir(), "scripts/azure-pipelines/DummyTest.xml")
dummy_ctest_dst = pjoin(build_dir, "Test.xml")
shutil.copy(dummy_ctest_src, dummy_ctest_dst)
print("[skipping unit tests]")

# build the docs
Expand Down
6 changes: 3 additions & 3 deletions src/docs/sphinx/dev_guide/new_docker_image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ Update/Add Docker Image
#. Once the "Docker TPL Build" action completes, it will produce artifacts for each of the generated host-configs.
Download these artifacts and rename them to just the compiler spec. For example, ``[email protected]``
to ``[email protected]`` and commit them to your branch under ``host-configs/docker``. You will also have to update
``azure-pipelines.yml`` if you added or change the existing compiler specs. These are all in variables called ``HOST_CONFIG``.
``.github/workflows/build-and-test.yml`` if you added or change the existing compiler specs. These are all in variables called ``host_config``.
#. Copy the new docker image names from each job under the ``Get dockerhub repo name`` step. For example,
``seracllnl/tpls:clang-14_06-02-22_04h-11m``. This will replace the previous image name at the top of ``azure-pipelines.yml``
``seracllnl/tpls:clang-14_06-02-22_04h-11m``. This will replace the previous image name at the top of ``.github/workflows/build-and-test.yml``
under the ``matrix`` section or add a new entry if you are adding a new docker image.
#. To include the new image in CI jobs, add/update the ``matrix`` entry to ``azure-pipelines.yml``, modifying its
#. To include the new image in CI jobs, add/update the ``matrix`` entry to ``.github/workflows/build-and-test.yml``, modifying its
attributes with the appropriate new image name (which is timestamped) and new host-config file.
2 changes: 1 addition & 1 deletion src/docs/sphinx/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ can be found in the Spack compiler files in our repository:

We currently regularly test the following Spack configuration files:

* Linux Ubuntu 22.04 (via Azure)
* Linux Ubuntu 22.04 (via Github Actions)
* TOSS4 (On Ruby at LC)
* BlueOS (On Lassen at LC)

Expand Down
Loading