CMake on Windows #4
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: CMake on Windows | |
on: | |
[workflow_call, workflow_dispatch] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
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 }} | |