-
Notifications
You must be signed in to change notification settings - Fork 408
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?
Changes from all commits
4b0a98b
7be7907
16b659f
4385b4a
72bbf9d
1d7852d
7346770
f08dc5b
223514c
745f071
979ae51
aef9e00
9f77426
b1f67ee
be7f9c2
789cb7c
aeae099
e6e8727
e798498
74624c1
ef459b2
e4d8d69
6a863f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,122 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: Build stuff | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||
| os: [ubuntu-latest, windows-latest] | ||||||||||||||||||||||||||||||||||||||||||||||||
| build_type: [Debug] | ||||||||||||||||||||||||||||||||||||||||||||||||
| include: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - os: windows-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| c_compiler: clang-cl | ||||||||||||||||||||||||||||||||||||||||||||||||
| cpp_compiler: clang-cl | ||||||||||||||||||||||||||||||||||||||||||||||||
| - os: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| c_compiler: clang | ||||||||||||||||||||||||||||||||||||||||||||||||
| cpp_compiler: clang++ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Ninja (Linux) | ||||||||||||||||||||||||||||||||||||||||||||||||
| if: runner.os == 'Linux' | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: sudo apt-get update && sudo apt-get install -y ninja-build | ||||||||||||||||||||||||||||||||||||||||||||||||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. PowerShell is the default for Windows.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - 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 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are the same.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: ninja | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Package Artifacts (Linux) | ||||||||||||||||||||||||||||||||||||||||||||||||
| if: runner.os == 'Linux' | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||
| cp XenonRecomp/XenonRecomp artifacts/ | ||||||||||||||||||||||||||||||||||||||||||||||||
| cp XenonAnalyse/XenonAnalyse artifacts/ | ||||||||||||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+72
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Package Artifacts (Windows) | ||||||||||||||||||||||||||||||||||||||||||||||||
| if: runner.os == 'Windows' | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| New-Item -ItemType Directory -Path artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||
| Copy-Item -Path XenonRecomp\XenonRecomp.exe -Destination artifacts\ | ||||||||||||||||||||||||||||||||||||||||||||||||
| Copy-Item -Path XenonAnalyse\XenonAnalyse.exe -Destination artifacts\ | ||||||||||||||||||||||||||||||||||||||||||||||||
| shell: powershell | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+80
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Upload 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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||||||||||||||||
| needs: build | ||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Download Linux Build Artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: XenonBinaries-ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| path: artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Download Windows Build Artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: XenonBinaries-windows-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| path: artifacts | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create GitHub Release | ||||||||||||||||||||||||||||||||||||||||||||||||
| id: create_release | ||||||||||||||||||||||||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| tag_name: ${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: Release ${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| body: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| **Automated release for** ${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - Includes builds for **Linux** and **Windows**. | ||||||||||||||||||||||||||||||||||||||||||||||||
| draft: false | ||||||||||||||||||||||||||||||||||||||||||||||||
| prerelease: false | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+116
to
+117
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These default to false.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
| files: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| artifacts/XenonBinaries-ubuntu-latest.zip | ||||||||||||||||||||||||||||||||||||||||||||||||
| artifacts/XenonBinaries-windows-latest.zip | ||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||
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.