Skip to content

GHA: re-enable Windows builds/tests. #35

GHA: re-enable Windows builds/tests.

GHA: re-enable Windows builds/tests. #35

Workflow file for this run

name: CD
on:
push:
branches: [ master ]
release:
types: [ created ]
workflow_dispatch:
jobs:
libraries:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: 'Windows static library'
os: windows-latest
shared_libs: OFF
- name: 'Windows shared library'
os: windows-latest
shared_libs: ON
- name: 'Linux static library'
os: ubuntu-latest
shared_libs: OFF
- name: 'Linux shared library'
os: ubuntu-latest
shared_libs: ON
- name: 'macOS static library (Intel)'
os: macos-13
shared_libs: OFF
- name: 'macOS shared library (Intel)'
os: macos-13
shared_libs: ON
- name: 'macOS static library (ARM)'
os: macos-latest
shared_libs: OFF
- name: 'macOS shared library (ARM)'
os: macos-latest
shared_libs: ON
env:
BUILDCACHE_ACCURACY: STRICT
BUILDCACHE_COMPRESS_FORMAT: ZSTD
BUILDCACHE_DEBUG: -1
BUILDCACHE_LOG_FILE: ""
steps:
- name: Check out libOpenCOR
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install buildcache
uses: mikehardy/buildcache-action@v2
with:
cache_key: libraries-${{ matrix.os }}-${{ matrix.shared_libs }}
- name: Configure MSVC
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Configure libOpenCOR
run: |
mkdir build
cd build
cmake -G Ninja -DBUILD_TYPE=Release -DCODE_ANALYSIS=OFF -DCODE_COVERAGE=OFF -DDOCUMENTATION=OFF -DJAVASCRIPT_BINDINGS=OFF -DMEMORY_CHECKS=OFF -DPYTHON_BINDINGS=OFF -DPYTHON_UNIT_TESTING=OFF -DSHARED_LIBS=${{ matrix.shared_libs }} -DUNIT_TESTING=OFF ..
- name: Build libOpenCOR
run: |
cd build
ninja
- name: Package libOpenCOR
run: |
cd build
cpack
- name: Upload libOpenCOR artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ./build/libOpenCOR-*
- name: Release libOpenCOR
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
with:
files: ./build/libOpenCOR-*
python_wheels:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: 'Windows Python wheels'
os: windows-latest
- name: 'Linux Python wheels'
os: ubuntu-latest
- name: 'macOS Python wheels (Intel)'
os: macos-13
- name: 'macOS Python wheels (ARM)'
os: macos-latest
steps:
- name: Check out libOpenCOR
uses: actions/checkout@v4
- name: Configure MSVC
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Build Python wheels
uses: pypa/cibuildwheel@v2.18.0
env:
CIBW_ARCHS: auto64
CIBW_BUILD: 'cp*'
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_SKIP: 'cp36* cp37* cp38* *musllinux*'
- name: Upload Python wheel artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ./wheelhouse/*.whl
- name: Release Python wheels
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
with:
files: ./wheelhouse/*.whl
webassembly:
name: WebAssembly
runs-on: macos-latest
env:
BUILDCACHE_ACCURACY: STRICT
BUILDCACHE_COMPRESS_FORMAT: ZSTD
BUILDCACHE_DEBUG: -1
BUILDCACHE_LOG_FILE: ""
steps:
- name: Check out libOpenCOR
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install buildcache
uses: mikehardy/buildcache-action@v2
with:
cache_key: webassembly
- name: Install Emscripten
run: brew install emscripten
- name: Configure libOpenCOR
run: |
mkdir build
cd build
cmake -G Ninja -DBUILD_TYPE=Release -DCODE_ANALYSIS=OFF -DCODE_COVERAGE=OFF -DDOCUMENTATION=OFF -DJAVASCRIPT_BINDINGS=ON -DJAVASCRIPT_UNIT_TESTING=OFF -DMEMORY_CHECKS=OFF -DPYTHON_BINDINGS=OFF -DPYTHON_UNIT_TESTING=OFF -DSHARED_LIBS=OFF -DUNIT_TESTING=OFF ..
- name: Build WebAssembly
run: |
cd build
ninja
- name: Upload WebAssembly artifact
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: WebAssembly
path: ./build/libOpenCOR-*
- name: Release WebAssembly
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
with:
files: ./build/libOpenCOR-*