WIP Debug 10 #309
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: push | |
env: | |
BUILD_TYPE: Release | |
MSYS: D:\msys2 | |
OPENSSL: "openssl-3.2.1" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# os: [ ubuntu, macos, windows ] | |
os: [ windows ] | |
# qt: [ "5.15.2", "6.6.2" ] | |
qt: [ "6.6.2" ] | |
include: | |
# - os: ubuntu | |
# generator: Unix Makefiles | |
# openssl_root: /usr | |
# artifact: build/xca-*-Linux.tar.gz | |
# host: linux | |
# runs: ubuntu-latest | |
# | |
# - os: macos | |
# generator: Unix Makefiles | |
# openssl_root: /usr/local/opt/[email protected] | |
# artifact: build/xca-*.dmg | |
# host: mac | |
# runs: macos-latest | |
- os: windows | |
generator: MinGW Makefiles | |
# ${{env.MSYS}} does not work here, WTH | |
openssl_root: 'C:\Program Files\OpenSSL-Win64\' | |
artifact: | | |
build/xca-*.msi | |
build/xca-portable-*.zip | |
host: windows | |
# - os: windows | |
# qt: "5.15.2" | |
# winarch: win64_mingw81 | |
# runs: windows-2019 | |
# tools: tools_mingw,qt.tools.win64_mingw810 | |
# exclude: | |
- os: windows | |
qt: "6.6.2" | |
winarch: win64_mingw | |
runs: windows-latest | |
tools: tools_mingw90 | |
runs-on: ${{matrix.runs}} | |
steps: | |
- name: Install Sphinx | |
run: pip3 install sphinx | |
- name: Install Qt ${{matrix.qt}} | |
uses: jurplel/install-qt-action@v3 | |
with: | |
arch: ${{matrix.winarch}} | |
version: ${{matrix.qt}} | |
tools: ${{matrix.tools}} | |
add-tools-to-path: true | |
set-env: true | |
# - name: Install MSYS2 on Windows | |
# uses: msys2/setup-msys2@v2 | |
# if: matrix.os == 'windows' | |
# with: | |
# location: ${{env.MSYS}} | |
# msystem: mingw64 | |
# install: curl perl make | |
- name: Brew install OpenSSL | |
if: matrix.os == 'macos' | |
run: brew install openssl | |
- name: Install OpenSSL for Windows | |
if: matrix.os == 'windows' | |
run: | | |
Get-ChildItem env: | Sort-Object Name | Format-List | |
pwd | |
iwr -URI https://slproweb.com/download/Win64OpenSSL-3_2_1.msi -OutFile openssl.msi | |
msiexec.exe /norestart /qn /quiet /i openssl.msi | |
- name: Checkout XCA | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure | |
# No YAML Multiline mechanism (>, |, \, >-, >+2 whatever) works as expected | |
# Give up. Live with the long line | |
run: cmake -B ${{github.workspace}}/build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DOPENSSL_ROOT_DIR=${{matrix.openssl_root}} --warn-uninitialized -DCMAKE_OSX_ARCHITECTURES=x86_64 | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build -j 5 -v | |
- name: Fixup after WindeployQT and Install | |
if: matrix.os == 'windows' | |
run: | | |
cd $env:RUNNER_WORKSPACE\${{matrix.qt}}\mingw_64\bin | |
cmake -E copy libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll ${{github.workspace}}\build | |
cmake --build ${{github.workspace}}/build -t install | |
- name: Test | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: | | |
cmake --build ${{github.workspace}}/build -t tests | |
ctest --test-dir ${{github.workspace}}/build -L console | |
- name: Install | |
if: matrix.os != 'windows' | |
run: DESTDIR=${{github.workspace}}/build/INSTALL cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t install | |
- name: Pack | |
run: | | |
cd ${{github.workspace}}/build | |
cpack -C ${{env.BUILD_TYPE}} | |
- name: Deploy | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{matrix.artifact}} | |
name: ${{matrix.os}}-${{matrix.qt}} |