Skip to content

Workflow use prebuilt vcpkg packages #187

Workflow use prebuilt vcpkg packages

Workflow use prebuilt vcpkg packages #187

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Run all CMake Tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master", "release" ]
tags: ["v*"]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
ubuntu-container-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
openmp: [TRUE, FALSE]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs the test container to run test scripts
- uses: docker://ghcr.io/gwmodel-lab/libgwmodel-docker4test:latest
with:
entrypoint: /bin/bash
args: -c "cmake -B build -S . -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_OpenMP=${{ matrix.openmp }} && cmake --build build --config Debug && ctest --test-dir build --output-on-failure"
windows-test:
runs-on: windows-latest
strategy:
matrix:
openmp: [TRUE, FALSE]
env:
USERNAME: GWmodel-Lab
VCPKG_EXE: ${{ env.VCPKG_INSTALLATION_ROOT }}/vcpkg.exe

Check failure on line 43 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Run all CMake Tests

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 43, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.VCPKG_INSTALLATION_ROOT .github/workflows/main.yml (Line: 47, Col: 7): Unexpected value 'content'
FEED_URL: https://nuget.pkg.github.com/GWmodel-Lab/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/GWmodel-Lab/index.json,readwrite"
permissions:
content: read
package: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Vcpkg Dependencies
shell: pwsh
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) sources add ${{ env.FEED_URL }} -n github -u ${{ env.USERNAME }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
.$(${{ env.VCPKG_EXE }} fetch nuget) setapikey ${{ secrets.GITHUB_TOKEN }} -Source "${{ env.FEED_URL }}"
."${{ env.VCPKG_EXE }}" install armadillo gsl catch2 --triplet x64-windows
- name: CMake build and test
if: steps.cache-dep.outputs.cache-hit == 'true'
run: |
mkdir build
cmake -B build -S . "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DCMAKE_BUILD_TYPE=Debug -DENABLE_OpenMP=${{ matrix.openmp }}
cmake --build build --config Debug
ctest --test-dir build -C Debug --output-on-failure
macos-test:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: brew install gsl armadillo catch2
- name: CMake build and test
run: |
mkdir build
cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DENABLE_OpenMP=FALSE
cmake --build build --config Debug
ctest --test-dir build --output-on-failure