Skip to content

Commit 665ffdf

Browse files
committed
ci: added Github Actions build workflow
1 parent 2e951f0 commit 665ffdf

File tree

4 files changed

+70
-8
lines changed

4 files changed

+70
-8
lines changed

.github/workflows/build.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build
2+
3+
on: [push]
4+
5+
jobs:
6+
linux_clang6:
7+
name: "Linux Clang6"
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
submodules: 'recursive'
13+
- run: ./.travis/linux/run-container.sh 6
14+
- uses: actions/upload-artifact@v2
15+
with:
16+
name: Linux Clang6
17+
path: upload/
18+
19+
linux_clang8:
20+
name: "Linux Clang8"
21+
runs-on: ubuntu-18.04
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
submodules: 'recursive'
26+
- run: ./.travis/linux/run-container.sh 8
27+
- uses: actions/upload-artifact@v2
28+
with:
29+
name: Linux Clang8
30+
path: upload/
31+
32+
android:
33+
name: "Android"
34+
runs-on: ubuntu-18.04
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
submodules: 'recursive'
39+
- run: ./.travis/android/run-container.sh
40+
- uses: actions/upload-artifact@v2
41+
with:
42+
name: Android
43+
path: upload/
44+
45+
macos:
46+
name: "macOS"
47+
runs-on: macOS-10.15
48+
steps:
49+
- uses: actions/checkout@v2
50+
with:
51+
submodules: 'recursive'
52+
- run: ./.travis/macos/install-dependencies.sh
53+
- run: ./.travis/macos/build.sh
54+
- uses: actions/upload-artifact@v2
55+
with:
56+
name: macOS
57+
path: upload/
58+
59+
# TODO: Add Windows

.travis/android/build.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
cd /home/build
55

6-
export BUILD_MODE=release
7-
if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
8-
export BUILD_MODE=debug
9-
fi
6+
export BUILD_MODE=${BUILD_MODE:-debug}
107

118
export OS=android
129
export DATE=$(date +%Y%m%d)

.travis/android/run-container.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22
# Run in Travis to launch container
33

44
# Setup signing
5+
export BUILD_MODE="debug"
56
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
67
openssl aes-256-cbc -K $encrypted_7333c7dd5b15_key -iv $encrypted_7333c7dd5b15_iv -in android/avocado.keystore.enc -out android/avocado.keystore -d
8+
export BUILD_MODE="release"
9+
fi
10+
11+
if [ "$GITHUB_ACTIONS" = "true" ]; then
12+
export BUILD_MODE="debug"
713
fi
814

915
mkdir -p "$HOME/.ccache"
1016

1117
docker run \
1218
-e CI=$CI \
13-
-e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \
19+
-e BUILD_MODE=$BUILD_MODE \
20+
-e keystore_password="$keystore_password" \
1421
-v $(pwd):/home/build \
1522
-v "$HOME/.ccache":/root/.ccache \
16-
-e keystore_password="$keystore_password" \
1723
avocadoemu/android \
1824
/bin/bash -ex /home/build/.travis/android/build.sh

.travis/macos/install-dependencies.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ mv premake5 /usr/local/bin/
99
rm premake-$PREMAKE_VERSION-macosx.tar.gz
1010

1111
# Download SDL2 and ccache
12-
brew update
13-
brew install sdl2 ccache
12+
brew update > /dev/null
13+
brew install sdl2 ccache

0 commit comments

Comments
 (0)