forked from ClassiCube/ClassiCube
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (70 loc) · 2.89 KB
/
build_win-arm.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
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build latest (Windows ARM32/64)
# trigger via either push to selected branches or on manual run
on:
push:
branches:
- main
- master
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-windows-arm
cancel-in-progress: true
jobs:
#============================================
# ============== ARM32 WINDOWS ==============
# ===========================================
build-32:
runs-on: ubuntu-latest
container:
image: dockcross/windows-armv7
steps:
- uses: actions/checkout@v4
- name: Compile ARM32 Windows builds
shell: bash
id: compile
env:
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
WIN32_FLAGS: "-mwindows -nostartfiles -Wl,-emain_real -DCC_NOMAIN -DCC_GFX_BACKEND=CC_GFX_BACKEND_D3D11"
run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
cd src
armv7-w64-mingw32-gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.WIN32_FLAGS }} -o cc-arm32-d3d11.exe $LATEST_FLAG -lwinmm -limagehlp
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 32 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }}
with:
SOURCE_FILE: 'src/cc-arm32-d3d11.exe'
DEST_NAME: 'ClassiCube-arm32-Direct3D11.exe'
#============================================
# ============== ARM64 WINDOWS ==============
# ===========================================
build-64:
runs-on: ubuntu-latest
container:
image: dockcross/windows-arm64
steps:
- uses: actions/checkout@v4
- name: Compile ARM64 Windows builds
shell: bash
id: compile
env:
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
WIN64_FLAGS: "-mwindows -nostartfiles -Wl,-emain_real -DCC_NOMAIN -DCC_GFX_BACKEND=CC_GFX_BACKEND_D3D11"
run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
cd src
aarch64-w64-mingw32-gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.WIN64_FLAGS }} -o cc-arm64-d3d11.exe $LATEST_FLAG -lwinmm -limagehlp
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile 64 bit Windows build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }}
with:
SOURCE_FILE: 'src/cc-arm64-d3d11.exe'
DEST_NAME: 'ClassiCube-arm64-Direct3D11.exe'