Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed May 2, 2024
1 parent 19c1ed9 commit e836fc8
Showing 1 changed file with 38 additions and 12 deletions.
50 changes: 38 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,43 @@ jobs:
BANNERLORD_BUTR_COMPATIBILITY_SCORE_URL: ${{ secrets.BANNERLORD_BUTR_COMPATIBILITY_SCORE_URL }}
shell: pwsh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v4
with:
name: bannerlord-tmp-${{matrix.project}}-${{matrix.configuration}}
path: ./bannerlord/

gpu-hint:
name: Add GPU Hints
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Download Bannerlord Temp artifact Pattern
uses: actions/download-artifact@v4
with:
pattern: bannerlord-tmp-*
merge-multiple: true
path: ./bannerlord
continue-on-error: true

- name: Add Dedicated GPU Hint
run: |
echo "Downloading ILAsm";
Invoke-WebRequest https://globalcdn.nuget.org/packages/runtime.linux-x64.microsoft.netcore.ilasm.8.0.0.nupkg -OutFile ilasm.nupkg;
Invoke-WebRequest https://globalcdn.nuget.org/packages/runtime.linux-x64.microsoft.netcore.ildasm.8.0.0.nupkg -OutFile ildasm.nupkg;
Invoke-WebRequest https://globalcdn.nuget.org/packages/runtime.win-x64.microsoft.netcore.ilasm.8.0.0.nupkg -OutFile ilasm.nupkg;
Invoke-WebRequest https://globalcdn.nuget.org/packages/runtime.win-x64.microsoft.netcore.ildasm.8.0.0.nupkg -OutFile ildasm.nupkg;
echo "Extracting ILAsm";
Expand-Archive ilasm.nupkg -d tools/ilasm;
Expand-Archive ildasm.nupkg -d tools/ildasm;
echo "chmod ILAsm";
chmod +x tools/ilasm/runtimes/linux-x64/native/ilasm;
chmod +x tools/ildasm/runtimes/linux-x64/native/ildasm;
#echo "chmod ILAsm";
#chmod +x tools/ilasm/runtimes/linux-x64/native/ilasm;
#chmod +x tools/ildasm/runtimes/linux-x64/native/ildasm;
# So what is happening here?
# We're not able to export global variables from C#
Expand Down Expand Up @@ -108,13 +134,13 @@ jobs:
cd $dirname/$runtime;
# Decompile to IL Code
#& "$workingDir/tools/ildasm/runtimes/win-x64/native/ildasm.exe" "$f" /OUT=Code.il
& "$workingDir/tools/ildasm/runtimes/linux-x64/native/ildasm" "$f" /OUT=Code.il
& "$workingDir/tools/ildasm/runtimes/win-x64/native/ildasm.exe" "$f" /OUT=Code.il
#& "$workingDir/tools/ildasm/runtimes/linux-x64/native/ildasm" "$f" -OUT="Code.il"
Copy-Item -Path $workingDir/build/ForceDedicatedGraphicCard.il -Destination ForceDedicatedGraphicCard.il;
# Recompile to .exe
#& "$workingDir/tools/ilasm/runtimes/win-x64/native/ilasm.exe" -QUIET -NOLOGO -OPTIMIZE -EXE /X64 -OUTPUT="$dirname.exe" Code.il ForceDedicatedGraphicCard.il
& "$workingDir/tools/ilasm/runtimes/linux-x64/native/ilasm" -QUIET -NOLOGO -OPTIMIZE -EXE /X64 -OUTPUT="$dirname.exe" Code.il ForceDedicatedGraphicCard.il
& "$workingDir/tools/ilasm/runtimes/win-x64/native/ilasm.exe" -QUIET -NOLOGO -OPTIMIZE -EXE /X64 -OUTPUT="$dirname.exe" Code.il ForceDedicatedGraphicCard.il
#& "$workingDir/tools/ilasm/runtimes/linux-x64/native/ilasm" -QUIET -NOLOGO -OPTIMIZE -EXE -X64 -OUTPUT="$dirname.exe" Code.il ForceDedicatedGraphicCard.il
# Set Icon
cd $workingDir/build/set-icon;
Expand All @@ -137,7 +163,7 @@ jobs:
###########################
publish-on-nexusmods:
if: github.ref == 'refs/heads/master'
needs: [get-changelog, build]
needs: [get-changelog, build, gpu-hint]
uses: BUTR/workflows/.github/workflows/release-nexusmods.yml@master
with:
nexusmods_game_id: mountandblade2bannerlord
Expand All @@ -155,7 +181,7 @@ jobs:
###########################
publish-on-github:
if: github.ref == 'refs/heads/master'
needs: [get-changelog, build]
needs: [get-changelog, build, gpu-hint]
uses: BUTR/workflows/.github/workflows/release-github.yml@master
with:
mod_id: Bannerlord.BLSE
Expand All @@ -168,7 +194,7 @@ jobs:
###########################
publish-on-steam:
if: false && github.ref == 'refs/heads/master'
needs: [get-changelog, build]
needs: [get-changelog, build, gpu-hint]
runs-on: ubuntu-latest
steps:
- name: Download Module artifact
Expand Down

0 comments on commit e836fc8

Please sign in to comment.