gha: Add job to build Talipot with MSVC (WIP) #1
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: windows-msvc-build | |
on: [push, pull_request] | |
jobs: | |
msvc: | |
name: Talipot build on Windows (MSVC) | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: cmd {0} | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Talipot code | |
uses: actions/checkout@v4 | |
- name: Prepare ccache timestamp | |
shell: msys2 {0} | |
id: get-current-date | |
run: | | |
echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT | |
# - name: Cache files | |
# uses: actions/cache@v4 | |
# with: | |
# path: ${{ steps.get-cccache-dir.outputs.ccache-dir }} | |
# key: windows-${{ matrix.config.arch }}-build-ccache-${{ steps.get-current-date.outputs.date }} | |
# restore-keys: | | |
# windows-${{ matrix.config.arch }}-build-ccache | |
# save-always: true | |
- name: Install build dependencies with vcpkg | |
uses: johnwason/vcpkg-action@v6 | |
id: vcpkg | |
with: | |
pkgs: zlib | |
zstd | |
qhull | |
yajl | |
graphviz | |
libgit2 | |
cppunit | |
freetype | |
glew | |
fontconfig | |
fribidi | |
triplet: x64-windows-release | |
token: ${{ github.token }} | |
github-binarycache: true | |
- name: Install Qt6 | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: "6.7.0" | |
host: windows | |
target: desktop | |
arch: win64_msvc2019_64 | |
modules: qtwebengine | |
cache: true | |
- name: Create build directory | |
run: mkdir build | |
# - name: Configure Talipot build with CMake | |
# working-directory: ./build | |
# run: cmake -G "MSYS Makefiles" | |
# -DCMAKE_BUILD_TYPE=Release | |
# -DCMAKE_NEED_RESPONSE=ON | |
# -DCMAKE_INSTALL_PREFIX=$PWD/install | |
# -DPython3_EXECUTABLE=/${{ matrix.config.msystem }}/bin/python3 | |
# -DTALIPOT_BUILD_TESTS=ON | |
# -DTALIPOT_USE_CCACHE=ON .. | |
# - name: Talipot build | |
# working-directory: ./build | |
# run: make -j4 | |
# - name: Install Talipot | |
# working-directory: ./build | |
# run: make -j4 install | |
# - name: Run Talipot unit tests | |
# working-directory: ./build | |
# run: make tests | |
# - name: Check Talipot application can be executed | |
# working-directory: ./build/install/bin | |
# run: ./talipot --check-application-starts --debug-plugins-load | |
# - name: Generate Talipot NSIS installer | |
# working-directory: ./build | |
# run: make bundle | |
# - name: Upload Talipot installer to GitHub Actions artifacts | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: Talipot-NSIS-installer-${{ matrix.config.msystem }} | |
# path: ./build/Talipot*.exe | |
# - name: Upload Talipot bundle to dev-latest prerelease | |
# if: github.ref == 'refs/tags/dev-latest' | |
# uses: ncipollo/release-action@v1 | |
# with: | |
# allowUpdates: true | |
# name: Talipot development build | |
# prerelease: true | |
# artifacts: ./build/Talipot*.exe | |
# token: ${{ secrets.GITHUB_TOKEN }} |