-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (64 loc) · 1.99 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Android CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-linux:
runs-on: ubuntu-latest
env:
JAVA_VERSION: "21"
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: 'stable'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
sudo apt install -y openjdk-${{ env.JAVA_VERSION }}-jdk wget unzip
JAVA_HOME=/usr/lib/jvm/java-${{ env.JAVA_VERSION }}-openjdk-amd64
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV
echo "${JAVA_HOME}/bin" >> $GITHUB_PATH
- name: Set up Android SDK/NDK
run: |
nimble -d:GitHubCI setupBuildEnv -Y
- name: Run tests
run: |
nimble -d:GitHubCI testCI
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: raylib-game-apk
path: ${{ github.workspace }}/raylib_game.apk
if-no-files-found: error
test-windows:
runs-on: windows-latest
env:
JAVA_VERSION: "21"
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: 'stable'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
choco install wget
choco install openjdk --version=${{ env.JAVA_VERSION }}
$JAVA_HOME = "C:\Program Files\OpenJDK\jdk-${{ env.JAVA_VERSION }}"
echo "JAVA_HOME=$JAVA_HOME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$env:JAVA_HOME\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set up Android SDK/NDK
run: |
nimble -d:GitHubCI setupBuildEnv -Y
- name: Run tests
run: |
nimble -d:GitHubCI testCI
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: raylib-game-apk-windows
path: ${{ github.workspace }}\raylib_game.apk
if-no-files-found: error