Skip to content

Commit fbaff05

Browse files
committed
Build with GitHub Actions [skip ci]
1 parent 06cc372 commit fbaff05

File tree

2 files changed

+103
-1
lines changed

2 files changed

+103
-1
lines changed

.github/workflows/build.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build_windows:
12+
runs-on: windows-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Add msbuild to PATH
16+
uses: microsoft/[email protected]
17+
- name: Compile Client
18+
run: msbuild.exe .\source\vcpp\cube.sln /p:Configuration=Release
19+
- name: Compile Server
20+
run: msbuild.exe .\source\vcpp\cube.sln /p:Configuration=Standalone
21+
- uses: actions/upload-artifact@v2
22+
with:
23+
name: acr_client.exe
24+
path: ./bin_win32/acr_client.exe
25+
- uses: actions/upload-artifact@v2
26+
with:
27+
name: acr_server.exe
28+
path: ./bin_win32/acr_server.exe
29+
build_linux:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: APT update
34+
run: sudo apt-get update -qq
35+
- name: APT install
36+
run: sudo apt-get install -qq build-essential libsdl1.2debian libsdl-image1.2 libopenal1 libsdl1.2-dev libsdl-image1.2-dev libopenal-dev libvorbis-dev libcurl3-dev
37+
- name: Compile
38+
working-directory: ./source/src
39+
run: make install
40+
env:
41+
CC: ${{ matrix.cc }}
42+
- uses: actions/upload-artifact@v2
43+
with:
44+
name: linux_64_client
45+
path: ./bin_unix/native_client
46+
if: ${{ matrix.cc == 'gcc' }}
47+
- uses: actions/upload-artifact@v2
48+
with:
49+
name: linux_64_server
50+
path: ./bin_unix/native_server
51+
if: ${{ matrix.cc == 'gcc' }}
52+
strategy:
53+
matrix:
54+
# cc: [ gcc, clang ]
55+
cc: [ gcc ]
56+
package:
57+
runs-on: ubuntu-latest
58+
# needs: [ build_windows, build_linux ]
59+
needs: build_linux
60+
steps:
61+
- run: sudo apt install p7zip-full
62+
- uses: actions/checkout@v2
63+
# - uses: actions/download-artifact@v2
64+
# with:
65+
# name: acr_client.exe
66+
# path: ./bin_windows/acr_client.exe
67+
# - uses: actions/download-artifact@v2
68+
# with:
69+
# name: acr_server.exe
70+
# path: ./bin_windows/acr_server.exe
71+
- uses: actions/download-artifact@v2
72+
with:
73+
name: linux_64_client
74+
path: ./bin_unix/linux_64_client
75+
- uses: actions/download-artifact@v2
76+
with:
77+
name: linux_64_server
78+
path: ./bin_unix/linux_64_server
79+
- working-directory: ./source
80+
run: ./package_acr.sh
81+
- working-directory: ./ACR_packaged
82+
run: |
83+
p7zip a -mff=258 -mpass=15 acr_02_07_00-l.zip ./acr_02_07_00-l/*
84+
# p7zip a -mff=258 -mpass=15 acr_02_07_00-w.zip ./acr_02_07_00-w/*
85+
p7zip a -mff=258 -mpass=15 acr_02_07_00-serv.zip ./acr_02_07_00-serv/*
86+
p7zip a -mff=258 -mpass=15 acr_02_07_00-src.zip ./acr_02_07_00-src/*
87+
- uses: actions/upload-artifact@v2
88+
with:
89+
name: acr_02_07_00-l.zip
90+
path: ./ACR_packaged/acr_02_07_00-l.zip
91+
# - uses: actions/upload-artifact@v2
92+
# with:
93+
# name: acr_02_07_00-w.zip
94+
# path: ./ACR_packaged/acr_02_07_00-w.zip
95+
- uses: actions/upload-artifact@v2
96+
with:
97+
name: acr_02_07_00-serv.zip
98+
path: ./ACR_packaged/acr_02_07_00-serv.zip
99+
- uses: actions/upload-artifact@v2
100+
with:
101+
name: acr_02_07_00-srv.zip
102+
path: ./ACR_packaged/acr_02_07_00-srv.zip

source/vcpp/cube.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Microsoft Visual Studio Solution File, Format Version 10.00
1+
Microsoft Visual Studio Solution File, Format Version 10.00
22
# Visual Studio 2008
33
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cube", "cube.vcproj", "{1FAF5BB4-C49A-4124-9F23-188528BAE7C8}"
44
EndProject

0 commit comments

Comments
 (0)