Skip to content

Commit

Permalink
cicd: adjust CICD to work with new CMake build
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazrius committed Mar 15, 2024
1 parent 3f417df commit 0b3ebf4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"

build:
build-msvc:
needs: date-check
if: ${{ needs.date-check.outputs.should_run != 'false' }}
env:
Expand All @@ -44,7 +44,13 @@ jobs:
id: vars
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')"
echo "::set-output name=body::$(git log master --since='24 hours ago' | sed -En 's/^ +?([a-z]+:\w*)/\1/p')"
BODY_ARR=$(git log master --since='24 hours ago' | sed -En 's/^ +?([a-z]+:\w*)/\1/p')
BODY=""
NL=$'\n'
for i in "${!BODY_ARR[@]}"; do
BODY="${BODY} - ${BODY_ARR[$i]}${NL}"
done
echo "::set-output name=body::$BODY"
WIN_HOME=$(echo $HOME | tr '/' '\\')
WIN_HOME="${WIN_HOME:1:1}:${WIN_HOME:2:${#WIN_HOME}-1}"
WIN_HOME=${WIN_HOME^}
Expand Down Expand Up @@ -97,15 +103,18 @@ jobs:
run:
curl -s -o ${{ github.workspace }}/Installer/Assets/External/FreelancerHDESetup_v06_silent_test.exe https://f003.backblazeb2.com/b2api/v2/b2_download_file_by_id?fileId=4_z0d41f4d9e10a9adf85d20013_f212668fac620798a_d20240305_m125353_c003_v0312019_t0022_u01709643233941

- name: CMake Generate
run: cmake --preset vs2022-msvc-release -S ${{ github.workspace }} -B ${{ github.workspace }}\build\vs2022-msvc-release

- name: Compile ChaosMod
run: msbuild.exe "${env:GITHUB_WORKSPACE}\FreelancerChaosMod.sln" /t:Build /p:Configuration=Release /p:Platform=x86
run: cmake --build ${{ github.workspace }}\build\vs2022-msvc-release --target ChaosMod --config Release

- name: "Pre-Build Installer"
run: |
cd ${{ github.workspace }}
mkdir Archive
Get-ChildItem -Path ".\Assets" | Move-Item -Destination ".\Archive"
Get-ChildItem -Path ".\Release" -Filter ".dll" -Recurse | Move-Item -Destination ".\Archive\EXE"
Get-ChildItem -Path ".\build\vs2022-msvc-release\Release" -Filter ".dll" -Recurse | Move-Item -Destination ".\Archive\EXE"
7z a -r ./chaosmod.7z ./Archive/*
Copy-Item -Path .\chaosmod.7z -Destination ./Installer/Assets/Mod
Expand Down

0 comments on commit 0b3ebf4

Please sign in to comment.