forked from joeyshuttleworth/bomberbloke
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
131dc49
commit 1dcc044
Showing
2 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
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,79 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
permissions: | ||
contents: write | ||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
build: [Release] | ||
|
||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v1 | ||
|
||
- name: Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential | ||
sudo apt-get install -y cmake make | ||
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev | ||
sudo apt-get install -y libenet-dev | ||
sudo apt-get install -y libcurl4-openssl-dev | ||
sudo apt-get install -y git | ||
git submodule update --init | ||
- name: Configure | ||
run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} --target bomberbloke_client bomberbloke_server | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
bomberbloke_server | ||
bomberbloke_client | ||
windows: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
build: [Release] | ||
|
||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v1 | ||
|
||
- name: Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential | ||
sudo apt-get install -y cmake make | ||
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev | ||
sudo apt-get install -y libenet-dev | ||
sudo apt-get install -y libcurl4-openssl-dev | ||
sudo apt-get install -y gcc-mingw-w64-base | ||
sudo apt install -y g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix | ||
sudo apt-get install -y git | ||
git submodule update --init | ||
- name: Configure | ||
run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DCMAKE_SYSTEM_NAME=Generic -D_WIN32=TRUE -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc-posix -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++-posix -DCMAKE_RC_COMPILER="$(which x86_64-w64-mingw32-windres)" -DDLLTOOL="$(which x86_64-w64-mingw32-dlltool)" -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
bomberbloke_server.exe | ||
bomberbloke_client.exe | ||
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