Ray-traced VC Textures #911
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: Build | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: [ 'Doc/**', 'Flights/**', 'Html/**', 'Images/**', 'Localdoc/**', 'Scenarios/**', 'Textures/**', 'Textures2/**'] | |
pull_request: | |
branches: | |
- main | |
paths-ignore: [ 'Doc/**', 'Flights/**', 'Html/**', 'Images/**', 'Localdoc/**', 'Scenarios/**', 'Textures/**', 'Textures2/**'] | |
jobs: | |
build: | |
name: Build | |
env: | |
DXSDK_DIR: "${{ github.workspace }}\\DXSDK" | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [x64, x86] | |
os: [windows-2019, windows-2022] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Problem Matcher | |
uses: ammaraskar/msvc-problem-matcher@master | |
- name: Setup MSVC Console | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.architecture }} | |
- name: Create directories | |
run: | | |
mkdir out\build | |
mkdir out\install | |
- name: Cache irrKlang package | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/Extern/irrKlang/${{ matrix.architecture }} | |
key: irrKlang-${{ matrix.architecture }} | |
- name: Cache DirectX SDK | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: "${{ github.workspace }}\\DXSDK" | |
key: dxsdk_jun10 | |
- name: Download DirectX SDK | |
if: steps.cache.outputs.cache-hit != 'true' | |
shell: cmd | |
run: | | |
curl -L https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o DXSDK_Jun10.exe | |
7z x DXSDK_Jun10.exe DXSDK/Include | |
7z x DXSDK_Jun10.exe DXSDK/Lib | |
del DXSDK_Jun10.exe | |
dir /S /B DXSDK | |
- name: Configure | |
run: cmake . --preset windows-${{ matrix.architecture }}-release -DORBITER_MAKE_DOC=OFF -DDXSDK_DIR:PATH="${{ github.workspace }}\\DXSDK" | |
- name: Build | |
run: cmake --build --preset windows-${{ matrix.architecture }}-release --jobs 2 | |
- name: Test | |
run: ctest --preset windows-${{ matrix.architecture }}-release --jobs 2 | |
- name: Install | |
working-directory: ${{ github.workspace }}/out/build/windows-${{ matrix.architecture }}-release | |
run: cmake --install . --prefix ${{ github.workspace }}/out/install | |
- name: List exports | |
working-directory: ${{ github.workspace }}/out/install/Orbiter | |
shell: cmd | |
run: | | |
dumpbin /EXPORTS Modules\Server\Orbiter.exe /OUT:exports_tmp0.txt | |
type exports_tmp0.txt | find " ?" > exports_tmp1.txt | |
for /F "tokens=4" %%F in (exports_tmp1.txt) do @echo %%F >> exports_tmp2.txt | |
undname exports_tmp2.txt | sort > exports.txt | |
del /Q exports_tmp*.txt | |
- name: Diff exports with Orbiter 2016 | |
if: ${{ matrix.architecture == 'x86' }} | |
shell: cmd | |
continue-on-error: true | |
run: git diff -U0 --ignore-cr-at-eol --ignore-space-at-eol --no-index exports.2016.txt out/install/Orbiter/exports.txt | |
- name: Upload exports | |
if: ${{ matrix.os == 'windows-2019' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: exports-${{ matrix.architecture }} | |
path: ${{ github.workspace }}/out/install/Orbiter/exports.txt | |
retention-days: 1 | |
- name: Pack | |
if: ${{ github.ref == 'refs/heads/main' }} | |
working-directory: ${{ github.workspace }}/out/install/Orbiter | |
shell: cmd | |
run: '7z a "${{ github.workspace }}/out/Orbiter.zip" .' | |
- name: Upload Build Artifact | |
if: ${{ github.ref == 'refs/heads/main' && matrix.os == 'windows-2019' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Orbiter-${{ matrix.architecture }} | |
# A file, directory or wildcard pattern that describes what to upload | |
path: ${{ github.workspace }}/out/Orbiter.zip | |
retention-days: 60 | |
pre-release: | |
name: Publish pre-release | |
needs: build | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/main' }} | |
steps: | |
- name: Create directories | |
run: mkdir out | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./out | |
- name: Re-arrange artifacts | |
run: | | |
mv ./Orbiter-x64/Orbiter.zip ./Orbiter-x64.zip | |
mv ./Orbiter-x86/Orbiter.zip ./Orbiter-x86.zip | |
rmdir Orbiter-x64 | |
rmdir Orbiter-x86 | |
ls -R | |
working-directory: ./out | |
- name: "Push pre-release tag and upload packages" | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Orbiter development build" | |
files: | | |
./out/Orbiter-x86.zip | |
./out/Orbiter-x64.zip |