Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI #16

Merged
merged 4 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 106 deletions .github/workflows/conda-and-cmake.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build/Test

on: [push, pull_request]

jobs:
build-and-test:

if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

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

defaults:
run:
shell: bash -l {0}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build-type: [Release]

steps:
- uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: latest
environment-name: testing
init-shell: >-
bash
powershell
create-args: >-
make
cmake
c-compiler
pkg-config
bmi-c

- name: Make CMake build directory
run: cmake -E make_directory build

- name: Configure CMake (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
working-directory: ${{ github.workspace }}/build
run: |
cmake ${{ github.workspace }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX

- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}\build
shell: pwsh
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x86

cmake ${{ github.workspace }} `
-DCMAKE_INSTALL_PREFIX:PATH=$env:CONDA_PREFIX\Library `
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}

- name: Build and install
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target install --config ${{ matrix.build-type }}

- name: Test
working-directory: ${{ github.workspace }}/build
run: ctest -C ${{ matrix.build-type }} --output-on-failure -VV