This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: split build workflow into separate cmake and xmake workflows
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/build.yml → .github/workflows/build-cmake.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build | ||
name: Build cmake | ||
|
||
on: [push, pull_request] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build xmake | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
|
||
name: ${{matrix.os}} | ||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup enviroment (Ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt update | ||
sudo apt install libudev-dev libx11-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libalut-dev libvorbis-dev libsndfile1-dev libsfml-dev | ||
- name: Setup clang (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: echo "PATH=$PATH:C:/msys64/mingw64/bin" >> $GITHUB_ENV | ||
|
||
- uses: xmake-io/github-action-setup-xmake@v1 | ||
|
||
- name: Build (Release) | ||
run: xmake -y | ||
|
||
- name: Upload binaries (Windows) | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gomoku-windows | ||
path: build/windows/x64/release/gomoku.exe | ||
|
||
- name: Upload binaries (Ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gomoku-ubuntu | ||
path: build/linux/x64/release/gomoku |