try python:3.12-alpine image #49
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
name: InChI build matrix | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
define-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.define-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Define build matrix | |
id: define-matrix | |
run: | | |
echo "matrix=$(cat .github/workflows/matrix.json| jq -c .)" >> $GITHUB_OUTPUT | |
build-inchi: | |
needs: define-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
${{ fromJson(needs.define-matrix.outputs.matrix) }} | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
container: | |
image: ${{ matrix.image || '' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Visual Studio shell | |
if: runner.os == 'Windows' | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: Install build dependencies | |
run: ${{ matrix.prebuild }} | |
- name: Build InChI | |
run: | | |
cmake -B builddir -G Ninja | |
cmake --build builddir | |
- name: save artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: inchi-${{ matrix.slug }}-${{ github.sha }} | |
path: builddir | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install test dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e INCHI-1-TEST[invariance-tests] | |
- name: Run executable tests | |
run: cmake --build builddir --target run-tests |