Skip to content

Update workflow to build 64-bit as well #105

Update workflow to build 64-bit as well

Update workflow to build 64-bit as well #105

Workflow file for this run

name: MSBuild
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
BUILD_PLATFORM: x86
DXSDK_DIR: $HOME/cache/
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
platform: [x86, x64]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache
id: my-cache
uses: actions/cache@v4
with:
path: ~/cache
key: my-cache
- name: Cache create
if: steps.my-cache.outputs.cache-hit != 'true'
run: |
curl -L https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o _DX2010_.exe
7z x _DX2010_.exe DXSDK/Include -o_DX2010_
7z x _DX2010_.exe DXSDK/Lib/x86 -o_DX2010_
7z x _DX2010_.exe DXSDK/Lib/x64 -o_DX2010_
mv _DX2010_/DXSDK $HOME/cache
rm -fR _DX*_ _DX*_.exe
ls -la $HOME/cache
shell: bash
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Add Nmake to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{matrix.platform}} /p:DXSDK_DIR=${{env.DXSDK_DIR}} ExemplarD3D9Chams.vcxproj
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: Release\ExemplarD3D9Chams.dll
retention-days: 5