Compile with MSBuild and VS 2022 for Windows #27
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: "Compile with MSBuild for Windows" | |
on: | |
workflow_dispatch: | |
# push: | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: sDNA\sdna_vs2008\sdna_vs2008.sln | |
# Configuration type to build. | |
BUILD_CONFIGURATION: Release | |
jobs: | |
compile: | |
name: Try to compile on windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Slightly adapted from https://github.com/libgeos/geos/blob/main/.github/workflows/ci.yml | |
- name: 'Setup' | |
run: choco install ccache | |
- name: Retrieve build cache | |
id: restore-cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: .ccache | |
key: windows-msvc-${{ env.BUILD_CONFIGURATION}}-${{ github.ref_name }}-${{ github.run_id }} | |
restore-keys: windows-msvc-${{ env.BUILD_CONFIGURATION}} | |
- name: 'Add "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\bin" to path' | |
shell: bash | |
run: echo "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\bin" >> $GITHUB_PATH | |
- name: Configure nmake | |
uses: ilammy/msvc-dev-cmd@v1 | |
# https://github.com/marketplace/actions/enable-developer-command-prompt | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Integrate vcpkg with Visual Studio | |
run: vcpkg integrate install | |
# - name: Install boost | |
# run: > | |
# vcpkg install | |
# boost-iterator | |
# boost-type-traits | |
# boost-mpl | |
# boost-foreach | |
# boost-utility | |
# boost-static-assert | |
# boost-smart-ptr | |
# boost-lexical-cast | |
# boost-pool | |
# boost-numeric-conversion | |
# boost-variant | |
# boost-bimap | |
# boost-math | |
# boost-algorithm | |
# boost-thread | |
# boost-geometry | |
# boost-random | |
# # https://vcpkg.io/en/packages | |
# - name: Install Geos | |
# run: vcpkg install geos | |
- name: Install Boost and Geos etc. from vcpkg.json | |
run: vcpkg install | |
# Copied from https://github.com/libgeos/geos/blob/main/.github/workflows/ci.yml | |
- name: Save build cache | |
uses: actions/cache/save@v3 | |
with: | |
path: .ccache | |
key: ${{ steps.restore-cache.outputs.cache-primary-key }} | |
- name: Build sDNA | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} | |
- name: upload output dir | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sdna_plus_output | |
path: output/ | |
retention-days: 5 |