chore(ci): update workflows #311
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: | |
pull_request: | |
push: | |
jobs: | |
build-windows: | |
name: Build (Windows) | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: true | |
path: openspades | |
- name: Cache vcpkg and dependencies | |
uses: actions/[email protected] | |
with: | |
path: | | |
vcpkg/installed | |
!.git | |
key: ${{ runner.os }}-${{ hashFiles('vcpkg_x86-windows.txt', '.gitmodules') }} | |
- name: Bootstrap vcpkg | |
run: vcpkg/bootstrap-vcpkg.bat | |
- name: Build dependencies | |
run: vcpkg/vcpkg install @vcpkg_x86-windows.txt | |
- name: Configure application | |
run: | | |
mkdir "${{ runner.workspace }}/openspades/openspades.mk" | |
cd "${{ runner.workspace }}/openspades/openspades.mk" | |
cmake .. -A Win32 ` | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo ` | |
--toolchain ${{ runner.workspace }}/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake ` | |
-D VCPKG_TARGET_TRIPLET=x86-windows-static | |
- name: Build application | |
run: | | |
cmake --build ${{ runner.workspace }}/openspades/openspades.mk ` | |
--config RelWithDebInfo ` | |
--parallel 2 | |
build-macos: | |
name: Build (macOS) | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: true | |
path: openspades | |
- name: Cache vcpkg and dependencies | |
uses: actions/[email protected] | |
with: | |
path: | | |
vcpkg/installed | |
!.git | |
${GITHUB_WORKSPACE}/ninja-build | |
key: ${{ runner.os }}-${{ hashFiles('vcpkg_x86_64-darwin.txt', '.gitmodules') }} | |
- name: Install ninja | |
run: | | |
pip3 install wheel setuptools | |
pip3 install ninja --upgrade | |
- name: Bootstrap vcpkg | |
run: vcpkg/bootstrap-vcpkg.sh | |
- name: Build dependencies | |
run: vcpkg/vcpkg install "@vcpkg_x86_64-darwin.txt" | |
- name: Configure application | |
run: | | |
mkdir "${{ runner.workspace }}/openspades/openspades.mk" | |
cmake -G Ninja \ | |
-D CMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-D CMAKE_OSX_ARCHITECTURES=x86_64 \ | |
-D CMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
-D VCPKG_TARGET_TRIPLET=x64-osx \ | |
-S ${{ runner.workspace }}/openspades \ | |
-B ${{ runner.workspace }}/openspades/openspades.mk | |
- name: Build application | |
run: | | |
ninja --verbose -C "${{ runner.workspace }}/openspades/openspades.mk" | |
build-nix: | |
name: Build (Linux + Nix) | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v18 | |
- name: Build Nix flake | |
run: nix build | |