test #6
Workflow file for this run
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: CI-cpp-windows | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
types: [opened, ready_for_review, reopened] | |
push: | |
paths: | |
- 'metrix-simulator/**' | |
- '.github/workflows/ci_windows.yml' | |
release: | |
types: [published] | |
# Cancel previous workflows if they are the same workflow on same ref (branch/tags) | |
# with the same event (push/pull_request) even they are in progress. | |
# This setting will help reduce the number of duplicated workflows. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: cmd | |
jobs: | |
windows: | |
env: | |
BOOST_ROOT: C:\thirdparties\boost-1.72.0 | |
BOOST_URL: https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe/download | |
name: Tests C++ Windows | |
runs-on: windows-latest | |
steps: | |
- name: Install Boost | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
choco install wget --no-progress | |
wget -nv -O boost-installer.exe %BOOST_URL% | |
boost-installer.exe /dir=%BOOST_ROOT% /sp- /verysilent /suppressmsgboxes /norestart | |
- name: Checkout sources | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6 | |
- name: Configure 3rd parties | |
run: > | |
cmake -S %GITHUB_WORKSPACE%\metrix-simulator\external -B %GITHUB_WORKSPACE%\metrix-simulator\build-windows\external | |
- name: Build 3rd parties | |
run: > | |
cmake --build %GITHUB_WORKSPACE%\metrix-simulator\build-windows\external --parallel 2 --config Release | |
- name: Configure CMake | |
run: > | |
cmake -Wno-dev -S %GITHUB_WORKSPACE%\metrix-simulator -B %GITHUB_WORKSPACE%\metrix-simulator\build-windows | |
-DCMAKE_BUILD_TYPE=Release | |
-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\metrix-simulator\build-windows\install | |
- name: Build | |
run: cmake --build %GITHUB_WORKSPACE%\metrix-simulator\build-windows --target install --parallel 2 --config Release | |
# - name: Tests | |
# run: cd %GITHUB_WORKSPACE%\metrix-simulator\build-windows && ctest -j2 --output-on-failure -C Release | |
- name: Prepare Metrix install artifact | |
shell: bash | |
id: metrix-install | |
run: | | |
ARCHIVE_NAME="metrix-simulator-windows" | |
ARCHIVE_PATH="${GITHUB_WORKSPACE}/${ARCHIVE_NAME}" | |
cd $GITHUB_WORKSPACE/metrix-simulator/build-windows/install | |
zip -r $ARCHIVE_PATH bin etc | |
echo "archive_name=$ARCHIVE_NAME" >> "$GITHUB_OUTPUT" | |
echo "archive_path=$ARCHIVE_PATH" >> "$GITHUB_OUTPUT" | |
- name: Upload Metrix install artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.metrix-install.outputs.archive_name }}.zip | |
path: ${{ steps.metrix-install.outputs.archive_path }}.zip |