Skip to content

build-test

build-test #791

Workflow file for this run

name: 'build-test'
on:
push:
pull_request:
schedule:
- cron: '0 1 * * FRI'
workflow_dispatch:
jobs:
build_and_test:
name: '${{ matrix.os }}: build and test'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
VCPKG_ROOT:
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: '20.x'
# How to consume GitHub packages, from this message (!): https://github.community/t/download-from-github-package-registry-without-authentication/14407/35
# Inspired from here: https://github.com/jcansdale-test/npmrc-configurations/blob/master/.github/workflows/blank.yml
- name: Authenticate to GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
echo "@${{ github.repository_owner }}:registry=https://npm.pkg.github.com/" >> ~/.npmrc
- uses: lukka/get-cmake@latest
- run: npm install
- run: npm run build
- run: npm run lint
- run: npm run pack
- run: npm run test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: ${{ matrix.os }}-build_and_unit_test
base-path: ${{ runner.os != 'macOS' && '__tests__/theAssets/vcpkg_project/' || '' }}
debug: true
tests:
name: '${{ matrix.os }}: functional tests'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
VCPKG_ROOT:
steps:
- name: checkout this action
uses: actions/checkout@v4
with:
submodules: true
- uses: lukka/get-cmake@latest
- name: test for run-cmake (Ninja)
uses: ./
with:
cmakeListsTxtPath: '${{ github.workspace }}/__tests__/theAssets/CMakeLists.txt'
configurePreset: default
buildPreset: default
testPreset: default
packagePreset: default
- name: test for run-cmake (Ninja Multi-Config)
uses: ./
with:
cmakeListsTxtPath: '${{ github.workspace }}/__tests__/theAssets/CMakeLists.txt'
configurePreset: default-multi
buildPreset: default-multi
testPreset: default-multi
packagePreset: default-multi
- name: build and test (skip configure) for run-cmake (Ninja Multi-Config) with specific config
uses: ./
with:
cmakeListsTxtPath: '${{ github.workspace }}/__tests__/theAssets/CMakeLists.txt'
buildPreset: default-multi
buildPresetAdditionalArgs: "['--config Release']"
testPreset: default-multi
testPresetAdditionalArgs: "['--build-config', 'Release']"