Skip to content

Commit

Permalink
Update msbuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mocsa authored Aug 27, 2024
1 parent 697953a commit 21f77b0
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ env:
BUILD_CONFIGURATION: Release

MSFS_SDK: MSFS_SDK\MSFS SDK
MSFS_SDK_PATH: 0.24.3
MSFS_SDK_VERSION: 0.24.3.0

permissions:
contents: read
Expand All @@ -34,6 +36,16 @@ jobs:
with:
submodules: 'recursive' # Checkout vcpkg submodule

- name: Cache vcpkg
uses: actions/cache@v2
with:
path: |
vcpkg/installed
vcpkg/downloads
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Setup vcpkg
run: |
cd vcpkg
Expand All @@ -46,9 +58,18 @@ jobs:
- name: Add MSBuild to PATH
uses: microsoft/[email protected]

- name: Download MSFS SDK file
- name: Cache MSFS SDK
id: cache-msfs-sdk
uses: actions/cache@v2
with:
path: |
$env:MSFS_SDK
key: msfs-sdk-$env:MSFS_SDK_VERSION

- if: ${{ steps.cache-msfs-sdk.outputs.cache-hit != 'true' }}
name: Download MSFS SDK file
run: |
curl -L -o MSFS_SDK_Core_Installer_0.24.3.0.msi https://sdk.flightsimulator.com/files/installers/0.24.3/MSFS_SDK_Core_Installer_0.24.3.0.msi
curl -L -o MSFS_SDK_Core_Installer_$env:MSFS_SDK_VERSION.msi https://sdk.flightsimulator.com/files/installers/$env:MSFS_SDK_PATH/MSFS_SDK_Core_Installer_$env:MSFS_SDK_VERSION.msi
- name: Print Folder Tree
uses: jaywcjlove/github-action-folder-tree@main
with:
Expand All @@ -57,9 +78,10 @@ jobs:

# Piping to Out-Null waits for completion
# Current path = Workspace. See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
- name: Extract msi
- if: ${{ steps.cache-msfs-sdk.outputs.cache-hit != 'true' }}
name: Extract msi
run: |
msiexec /a MSFS_SDK_Core_Installer_0.24.3.0.msi /qb TARGETDIR=$env:GITHUB_WORKSPACE\MSFS_SDK | Out-Null
msiexec /a MSFS_SDK_Core_Installer_$env:MSFS_SDK_VERSION.msi /qb TARGETDIR=$env:GITHUB_WORKSPACE\MSFS_SDK | Out-Null
# https://stackoverflow.com/questions/70036493/
# $file = "MSFS_SDK_Core_Installer_0.24.3.0.msi"
# $log = "install.log"
Expand Down

0 comments on commit 21f77b0

Please sign in to comment.