Skip to content

edit: fix cuda compile error on linux (#74) #170

edit: fix cuda compile error on linux (#74)

edit: fix cuda compile error on linux (#74) #170

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Run all CMake Tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master", "release" ]
tags: ["v*"]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
ubuntu-container-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
openmp: [TRUE, FALSE]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs the test container to run test scripts
- uses: docker://ghcr.io/gwmodel-lab/libgwmodel-docker4test:latest
with:
entrypoint: /bin/bash
args: -c "cmake -B build -S . -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_OpenMP=${{ matrix.openmp }} && cmake --build build --config Debug && ctest --test-dir build --output-on-failure"
windows-prepare:
runs-on: windows-latest
steps:
- name: Cache Dependencies
id: cache-dep
uses: actions/cache@v3
with:
path: |
C:/vcpkg
C:/vcpkg/build/vcpkg_installed
!C:/vcpkg/.git
!C:/vcpkg/buildtrees
!C:/vcpkg/packages
!C:/vcpkg/downloads
key: |
${{ runner.os }}-cache-key-v1
- name: Install Vcpkg Dependencies
if: steps.cache-dep.outputs.cache-hit != 'true'
run: |
git pull --rebase
./bootstrap-vcpkg.bat
./vcpkg.exe update
./vcpkg.exe install gsl:x64-windows openblas[threads]:x64-windows armadillo:x64-windows catch2:x64-windows
working-directory: C:/vcpkg
windows-test:
runs-on: windows-latest
needs: [windows-prepare]
strategy:
matrix:
openmp: [TRUE, FALSE]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Dependencies
id: cache-dep
uses: actions/cache/restore@v3
with:
path: |
C:/vcpkg
C:/vcpkg/build/vcpkg_installed
!C:/vcpkg/.git
!C:/vcpkg/buildtrees
!C:/vcpkg/packages
!C:/vcpkg/downloads
key: |
${{ runner.os }}-cache-key-v1
- name: CMake build and test
if: steps.cache-dep.outputs.cache-hit == 'true'
run: |
mkdir build
cmake -B build -S . "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DCMAKE_BUILD_TYPE=Debug -DENABLE_OpenMP=${{ matrix.openmp }}
cmake --build build --config Debug
ctest --test-dir build -C Debug --output-on-failure
macos-test:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: brew install gsl armadillo catch2
- name: CMake build and test
run: |
mkdir build
cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DENABLE_OpenMP=FALSE
cmake --build build --config Debug
ctest --test-dir build --output-on-failure