Skip to content

CMake on Windows

CMake on Windows #8

Workflow file for this run

name: CMake on Windows
on:
[workflow_call, workflow_dispatch]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0 #treeless clone, tags are preserved (possible issues with fetch-tags and fetch-depth 1)
path: jabs
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
target: 'desktop'
- name: vcpkg build
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
pkgs: gsl getopt libxml2
triplet: x64-windows-release
token: ${{ github.token }}
github-binarycache: true
- name: Obtain files from outside the repository
shell: cmd
run: |
cd ${{ github.workspace }}\jabs
.\get_external_files.bat
- name: Checkout JIBAL
uses: actions/checkout@v4
with:
repository: JYU-IBA/jibal
path: jibal
- name: Configure JIBAL
run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -B ${{github.workspace}}\build_jibal -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{github.workspace}}\jibal
- name: Build JIBAL
run: cmake --build ${{ github.workspace }}\build_jibal --config ${{ env.build_type }}
- name: Install JIBAL
run: cmake --install ${{ github.workspace }}\build_jibal --prefix ${{ github.workspace }}\install
- name: Configure JaBS
run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -DCMAKE_PREFIX_PATH="${{github.workspace}}\install" -B ${{github.workspace}}\build_jabs -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{github.workspace}}\jabs
- name: Build JaBS
run: cmake --build ${{github.workspace}}\build_jabs --config ${{env.BUILD_TYPE}}
- name: Install JaBS
run: cmake --install ${{ github.workspace }}\build_jabs --prefix ${{ github.workspace }}\install
- name: Configure QJaBS
run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -DCMAKE_PREFIX_PATH="${{github.workspace}}\install" -B ${{github.workspace}}\build_qjabs -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{github.workspace}}\jabs\qjabs
- name: Build QJaBS
run: cmake --build ${{github.workspace}}\build_qjabs --config ${{env.BUILD_TYPE}}
- name: Deploy Qt
run: ${{env.QT_ROOT_DIR}}\bin\windeployqt ${{github.workspace}}\build_qjabs\${{ env.build_type }}\qjabs.exe
- name: Run deploy script
shell: cmd
run: |
cd ${{ github.workspace }}\jabs\release_scripts
.\deploy_win.bat
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-windows
path: |
${{ github.workspace }}/build_qjabs/${{ env.build_type }}