Skip to content

Merge remote-tracking branch 'origin/main' into async_thinknode_ctx_p… #506

Merge remote-tracking branch 'origin/main' into async_thinknode_ctx_p…

Merge remote-tracking branch 'origin/main' into async_thinknode_ctx_p… #506

Workflow file for this run

name: MSVC
on: [push, pull_request]
env:
CTEST_OUTPUT_ON_FAILURE: 1
CRADLE_THINKNODE_API_TOKEN: ${{ secrets.CRADLE_THINKNODE_API_TOKEN }}
CRADLE_THINKNODE_DOCKER_AUTH: ${{ secrets.CRADLE_THINKNODE_DOCKER_AUTH }}
jobs:
preprocess:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# TODO: The preprocessing job shouldn't require vcpkg.
- uses: friendlyanon/setup-vcpkg@v1
with:
committish: 7ba0ba7334c3346e7eee1e049ba85da193a8d821
- name: Install
run: |
sudo apt install lcov ocaml-nox
sudo pip3 install virtualenv
- name: Preprocess
run: |
export CC=`which gcc-10`
export CXX=`which g++-10`
${CXX} --version
scripts/set-up-python.sh --python=python3
source .venv/bin/activate
cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug \
-D"CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
.
cmake --build build --target preprocessing -j4
- name: Upload preprocessed headers as build artifact
uses: actions/upload-artifact@v4
with:
name: preprocessed
path: build/generated
- name: Deploy preprocessed headers to preprocessor-output repo
uses: JamesIves/[email protected]
with:
repository-name: open-cradle/preprocessor-output
branch: output
target-folder: generated
tag: output-${{ github.sha }}
token: ${{ secrets.CRADLE_PREPROCESSOR_OUTPUT_TOKEN }}
folder: build/generated
single-commit: true
VS2019:
runs-on: windows-2019
needs: preprocess
strategy:
matrix:
config: [Debug, Release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: friendlyanon/setup-vcpkg@v1
with:
committish: 7ba0ba7334c3346e7eee1e049ba85da193a8d821
- name: Download preprocessed headers
uses: actions/download-artifact@v4
with:
name: preprocessed
path: preprocessed
- name: Set Up Python
run: |
pip install pyyaml
- name: Configure
run: >
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}}
-D"CMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
-DCRADLE_PREPROCESSOR_USAGE=External
-DCRADLE_EXTERNALLY_PREPROCESSED_DIRECTORY=preprocessed
-DCRADLE_LOCAL_DOCKER_TESTING=OFF
- name: Build
run: |
cmake --build build --config ${{matrix.config}} -j4
Get-ChildItem -Recurse build
- name: Test
run: |
python python/generate_config.py $Env:CRADLE_THINKNODE_API_TOKEN
cmake --build build --config ${{matrix.config}} --target all_unit_tests -j4
- name: Benchmarks
if: ${{ matrix.config == 'Release' }}
run: |
cmake --build build --config Release --target benchmark_tests