Skip to content

Commit

Permalink
ci: more meaningful tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Feb 22, 2023
1 parent f61033f commit 3f2f702
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 20 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: Build
name: Continuous

on: [push]

jobs:
Continuous:
name: ${{ matrix.name }} (${{ matrix.config }})
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}

linux-mac:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
config: [Release, Debug, RelWithDebInfo]
cfg: [{os: ubuntu-latest, cxx: g++-12},
{os: ubuntu-latest, cxx: g++-9},
{os: macos-latest, cxx: clang++}]
config: [Release, Debug]

runs-on: ${{ matrix.cfg.os }}

env:
CXX: ${{ matrix.cfg.cxx }}

steps:
- uses: actions/checkout@v3
Expand All @@ -25,4 +27,26 @@ jobs:
run: cmake --build build --parallel

- name: CTest
run: ctest --test-dir build
run: ctest --test-dir build -V


windows-msvc:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Configure CMake
run: cmake -B build -DSTLBFGS_UNIT_TESTS=ON

- name: Release build
run: cmake --build build --parallel --config Release

- name: Release CTest
run: ctest --test-dir build -C Release -V

- name: Debug build
run: cmake --build build --parallel --config Debug

- name: Debug CTest
run: ctest --test-dir build -C Debug -V
35 changes: 26 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ on:
- cron: '0 4 * * *'

jobs:
Continuous:
name: ${{ matrix.name }} (${{ matrix.config }})
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
core:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
config: [Release, Debug, RelWithDebInfo]
os: [ubuntu-latest, macos-latest]
config: [Release, Debug]

steps:
- uses: actions/checkout@v3
Expand All @@ -27,4 +22,26 @@ jobs:
run: cmake --build build --parallel

- name: CTest
run: ctest --test-dir build
run: ctest --test-dir build -V


windows-msvc:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Configure CMake
run: cmake -B build -DSTLBFGS_UNIT_TESTS=ON

- name: Release build
run: cmake --build build --parallel --config Release

- name: Release CTest
run: ctest --test-dir build -C Release -V

- name: Debug build
run: cmake --build build --parallel --config Debug

- name: Debug CTest
run: ctest --test-dir build -C Debug -V

0 comments on commit 3f2f702

Please sign in to comment.