Skip to content

Commit

Permalink
refactor CI stuff so it is simpler and better contained (#37)
Browse files Browse the repository at this point in the history
* refactor CI stuff so it is simpler and better contained

* different conda setup

* cancelability

* remove unnecessary stuff

* oops
  • Loading branch information
hobu authored May 10, 2024
1 parent 055b2ec commit f8d5dae
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 137 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build

on: [push, pull_request]


concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Compile on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'

- uses: mamba-org/setup-micromamba@v1
name: Setup Conda
with:
init-shell: bash
environment-file: environment.yml
environment-name: "wrench"
cache-environment: true
cache-downloads: true

- name: Create working directory
shell: bash -l {0}
run: |
mkdir build
- name: Run cmake
shell: bash -l {0}
working-directory: ./build
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export CC=cl.exe
export CXX=cl.exe
fi
cmake -G Ninja \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
..
- name: Build pdal_wrench
shell: bash -l {0}
working-directory: ./build
run: |
ninja
ninja install
44 changes: 0 additions & 44 deletions .github/workflows/linux.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/macos.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/windows.yml

This file was deleted.

11 changes: 11 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: wrench
channels:
- conda-forge
dependencies:
- conda
- mamba
- compilers
- ninja
- cmake
- pdal

0 comments on commit f8d5dae

Please sign in to comment.