Add automatic builds for Linux/Windows#24
Conversation
|
Neat, but you might want to add the GitHub release step so it's shown in the Releases section. |
Hmmmm I wonder if I've got it right, the if check might be futile but I don't see what other name I could give to the releases |
|
For future reference, instead of submitting a PR with 19 commits with the same title, you can always E.X. New commit making changes to same file on top of another commit |
|
You can also just squash-merge the PR to clean up the history while merging it. |
I will look into that, thanks. I usually give a minimal description to my commits, but this time I used the website's API so it ends up looking pretty messy and not very informative |
Then where are you going to upload nightlies? Because GitHub Actions storing artifacts for a short period of time and requiring a sign-in to download is kinda cringe. |
|
The recompiler is incomplete and will most likely require the user to make modifications to it. I don't see much point to providing prebuilt binaries. |
| - name: Install Ninja (Linux) | ||
| if: runner.os == 'Linux' | ||
| run: sudo apt-get update && sudo apt-get install -y ninja-build | ||
| shell: bash |
There was a problem hiding this comment.
Bash is the default shell for Linux.
| shell: bash |
| - name: Install Ninja (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: choco install ninja | ||
| shell: powershell |
There was a problem hiding this comment.
PowerShell is the default for Windows.
| shell: powershell |
| - name: Configure CMake (Linux) | ||
| if: runner.os == 'Linux' | ||
| run: > | ||
| cmake | ||
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | ||
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
| -G Ninja | ||
| -S . | ||
| shell: bash | ||
|
|
||
| - name: Configure CMake (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: > | ||
| cmake | ||
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | ||
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
| -G Ninja | ||
| -S . | ||
| shell: powershell |
There was a problem hiding this comment.
These are the same.
| - name: Configure CMake (Linux) | |
| if: runner.os == 'Linux' | |
| run: > | |
| cmake | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -G Ninja | |
| -S . | |
| shell: bash | |
| - name: Configure CMake (Windows) | |
| if: runner.os == 'Windows' | |
| run: > | |
| cmake | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -G Ninja | |
| -S . | |
| shell: powershell | |
| - name: Configure CMake | |
| run: cmake -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -GNinja -S . |
| cp XenonRecomp/XenonRecomp artifacts/ | ||
| cp XenonAnalyse/XenonAnalyse artifacts/ | ||
| shell: bash |
There was a problem hiding this comment.
| cp XenonRecomp/XenonRecomp artifacts/ | |
| cp XenonAnalyse/XenonAnalyse artifacts/ | |
| shell: bash | |
| cp XenonRecomp/XenonRecomp XenonAnalyse/XenonAnalyse artifacts |
| draft: false | ||
| prerelease: false |
There was a problem hiding this comment.
These default to false.
| draft: false | |
| prerelease: false |
| Copy-Item -Path XenonRecomp\XenonRecomp.exe -Destination artifacts\ | ||
| Copy-Item -Path XenonAnalyse\XenonAnalyse.exe -Destination artifacts\ | ||
| shell: powershell |
There was a problem hiding this comment.
| Copy-Item -Path XenonRecomp\XenonRecomp.exe -Destination artifacts\ | |
| Copy-Item -Path XenonAnalyse\XenonAnalyse.exe -Destination artifacts\ | |
| shell: powershell | |
| Copy-Item XenonRecomp\XenonRecomp.exe XenonAnalyse\XenonAnalyse.exe artifacts |
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: XenonBinaries-${{ matrix.os }} | ||
| path: artifacts/* |
There was a problem hiding this comment.
| path: artifacts/* | |
| path: artifacts/* | |
| if-no-files-found: error | |
First time I do this so I don't know if my workflow is any good, and I did unashamedly cross-reference some github template examples with AI coding tools but after testing them the artifacts seem to run like intended.