updates to cmake build for windows #613
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 | |
on: | |
push: | |
branches: [ main, dev, imagine ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# build-linux-and-analyze: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.25.2' | |
# - name: Initialize CodeQL | |
# uses: github/codeql-action/init@v1 | |
# with: | |
# languages: c | |
- name: Compile | |
run: | | |
sudo apt-get update | |
sudo apt-get install curl libcurl4-openssl-dev -y | |
cmake -B . | |
cmake --build . -- -j 12 | |
chmod +x blade/blade | |
- name: Test | |
run: ctest | |
# - name: Perform CodeQL Analysis | |
# uses: github/codeql-action/analyze@v1 | |
- name: Generate Artifacts | |
if: '!cancelled()' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blade-linux-${{ github.run_id }} | |
path: ${{github.workspace}}/blade | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.25.2' | |
- uses: actions/checkout@v4 | |
- name: Compile | |
run: | | |
cmake -B . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl | |
cmake --build . -- -j 12 | |
chmod 755 blade/blade | |
- name: Test | |
run: ctest | |
- name: Generate Artifacts | |
if: '!cancelled()' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blade-macos-${{ github.run_id }} | |
path: ${{github.workspace}}/blade | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.28.x' | |
- name: Setup WinLibs | |
uses: bwoodsend/[email protected] | |
with: | |
add_to_path: true | |
tag: 12.2.0-15.0.6-10.0.0-msvcrt-r3 | |
- uses: actions/checkout@v4 | |
- uses: friendlyanon/setup-vcpkg@v1 | |
with: { committish: 3508985146f1b1d248c67ead13f8f54be5b4f5da, cache-version: "1", cache-key: "vcpkg-windows", cache-restore-keys: "vcpkg-windows" } | |
- name: Install Dependencies | |
run: | | |
${{ env.VCPKG_ROOT }}/vcpkg update | |
${{ env.VCPKG_ROOT }}/vcpkg version | |
${{ env.VCPKG_ROOT }}/vcpkg install curl:x64-windows libffi:x64-windows openssl:x64-windows-static libpng:x64-windows libjpeg-turbo:x64-windows | |
${{ env.VCPKG_ROOT }}/vcpkg list | |
- name: Compile | |
run: | | |
cmake -B . -G "Unix Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static | |
cmake --build . -- -j 12 | |
- name: Test | |
run: ctest | |
- name: Generate Artifacts | |
if: '!cancelled()' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blade-windows-default-${{ github.run_id }} | |
path: ${{github.workspace}}/blade |