Skip to content

Commit

Permalink
Add macOS CI on GitHub Actions
Browse files Browse the repository at this point in the history
gcc-11 real build
brew dependencies
  • Loading branch information
williamfgc authored and ye-luo committed Oct 1, 2021
1 parent 7ee1a1d commit 72d4c01
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 80 deletions.
189 changes: 109 additions & 80 deletions .github/workflows/ci-github-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@

name: GitHub Actions CI

on:
on:
push:
branches:
- develop
branches:
- develop
pull_request:
branches:
- develop
branches:
- develop

jobs:

linux:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
Expand All @@ -20,79 +18,110 @@ jobs:
strategy:
fail-fast: false
matrix:
jobname: [
gcc-openmpi-real-coverage,
gcc-openmpi-complex-coverage,
gcc11-real-werror,
gcc11-complex-werror,
clang-real-asan,
clang-complex-asan,
clang-openmpi-real-ubsan,
clang-latest-openmp-offload
]
jobname:
[
gcc-openmpi-real-coverage,
gcc-openmpi-complex-coverage,
gcc11-real-werror,
gcc11-complex-werror,
clang-real-asan,
clang-complex-asan,
clang-openmpi-real-ubsan,
clang-latest-openmp-offload,
]
include:
- jobname: gcc-openmpi-real-coverage
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: gcc-openmpi-complex-coverage
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: gcc11-real-werror
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
options: -u 1001

- jobname: gcc11-complex-werror
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
options: -u 1001

- jobname: clang-real-asan
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-complex-asan
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-openmpi-real-ubsan
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-latest-openmp-offload
container:
image: williamfgc/qmcpack-ci:ubuntu20-clang-latest
options: -u 1001
- jobname: gcc-openmpi-real-coverage
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: gcc-openmpi-complex-coverage
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: gcc11-real-werror
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
options: -u 1001

- jobname: gcc11-complex-werror
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
options: -u 1001

- jobname: clang-real-asan
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-complex-asan
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-openmpi-real-ubsan
container:
image: williamfgc/qmcpack-ci:ubuntu20-openmpi
options: -u 1001

- jobname: clang-latest-openmp-offload
container:
image: williamfgc/qmcpack-ci:ubuntu20-clang-latest
options: -u 1001

steps:
- name: Checkout Action
uses: actions/checkout@v1

- name: Configure
run: tests/test_automation/github-actions/ci/run_step.sh configure

- name: Build
run: tests/test_automation/github-actions/ci/run_step.sh build

- name: Test
run: tests/test_automation/github-actions/ci/run_step.sh test

- name: Coverage
if: contains(matrix.jobname, 'coverage')
run: tests/test_automation/github-actions/ci/run_step.sh coverage

- name: Upload Coverage
if: contains(matrix.jobname, 'coverage') && github.repository_owner == 'QMCPACK'
uses: codecov/codecov-action@v1
with:
file: ../qmcpack-build/coverage.xml
flags: tests-deterministic # optional
name: codecov-QMCPACK # optional
fail_ci_if_error: true # optional (default = false)

macos:
runs-on: macos-latest
env:
GH_JOBNAME: ${{ matrix.jobname }}
GH_OS: macOS

strategy:
fail-fast: false
matrix:
jobname: [macOS-gcc11-real]

steps:
- name: Checkout Action
uses: actions/checkout@v1

- name: Configure
run: tests/test_automation/github-actions/ci/run_step.sh configure

- name: Build
run: tests/test_automation/github-actions/ci/run_step.sh build

- name: Test
run: tests/test_automation/github-actions/ci/run_step.sh test

- name: Coverage
if: contains(matrix.jobname, 'coverage')
run: tests/test_automation/github-actions/ci/run_step.sh coverage

- name: Upload Coverage
if: contains(matrix.jobname, 'coverage') && github.repository_owner == 'QMCPACK'
uses: codecov/codecov-action@v1
with:
file: ../qmcpack-build/coverage.xml
flags: tests-deterministic # optional
name: codecov-QMCPACK # optional
fail_ci_if_error: true # optional (default = false)
- name: Checkout Action
uses: actions/checkout@v2

- name: Setup Dependencies
run: brew install ninja hdf5 libxml2 openblas lapack boost fftw

- name: Configure
run: tests/test_automation/github-actions/ci/run_step.sh configure

- name: Build
run: tests/test_automation/github-actions/ci/run_step.sh build

- name: Test
run: tests/test_automation/github-actions/ci/run_step.sh test

- name: Install
run: tests/test_automation/github-actions/ci/run_step.sh install
7 changes: 7 additions & 0 deletions tests/test_automation/github-actions/ci/run_step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ case "$1" in
-DQMC_COMPLEX=$IS_COMPLEX \
${GITHUB_WORKSPACE}
;;
*"macOS-gcc11"*)
echo 'Configure for building on macOS using gcc-11'
cmake -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 \
-DQMC_MPI=0 \
-DQMC_COMPLEX=$IS_COMPLEX \
${GITHUB_WORKSPACE}
;;
# Configure with default compilers
*)
echo 'Configure for default system compilers and options'
Expand Down

0 comments on commit 72d4c01

Please sign in to comment.