-
Notifications
You must be signed in to change notification settings - Fork 400
Add automatic builds for Linux/Windows #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you! Could you also add Release and RelWithDebInfo configurations to the matrix? I also don't really want GitHub releases to be created, so if you could remove that step it'd be great.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.