-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Actions CI workflow * Try building on Windows * Test on Windows * Use bash for tests on all platforms * Try removing PKG_CONFIG_EXECUTABLE variable from cmake call * Remove Travis CI config; replace badge with Actions
- Loading branch information
Showing
3 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build and Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run | ||
# by the push to the branch. Without this if check, checks are duplicated since | ||
# internal PRs match both the push and pull_request events. | ||
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@v2 | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
mamba-version: "*" | ||
channels: conda-forge,defaults | ||
channel-priority: true | ||
|
||
- name: Show conda installation info | ||
run: conda info | ||
|
||
- name: Install build tools and dependencies into env | ||
run: | | ||
mamba install make cmake c-compiler pkg-config | ||
mamba list | ||
- 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 .. \ | ||
-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 (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x86 | ||
cmake .. ` | ||
-DCMAKE_INSTALL_PREFIX:PATH=$env:CONDA_PREFIX ` | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | ||
- name: Build | ||
working-directory: ${{ github.workspace }}/build | ||
run: cmake --build . --target install --config ${{ matrix.build-type }} | ||
|
||
- name: Test | ||
run: | | ||
test -f $CONDA_PREFIX/include/bmi.h | ||
test -f $CONDA_PREFIX/lib/pkgconfig/bmic.pc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters