Repository navigation
117 lines (98 loc) · 3.42 KB
/
Copy pathaaaa.yml
File metadata and controls
117 lines (98 loc) · 3.42 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build Box64
permissions:
contents: read
actions: write
on:
workflow_dispatch:
inputs:
platform:
description: "Target platform"
required: true
default: "ANDROID"
type: choice
options:
- X64
- RISCV
- RK3588
- ARM64
- ANDROID
- TERMUX
- LARCH64
- PPC64LE
- ANDROID_GLIBC
- WOW64
build_type:
description: "Build type"
required: true
default: "Release"
type: choice
options:
- Release
- Trace
- StaticBuild
- Box32
run_tests:
description: "Run CTest after build"
required: true
default: false
type: boolean
jobs:
validate:
name: Validate Selection
runs-on: ubuntu-latest
steps:
- name: Validate platform and build type
shell: bash
run: |
platform="${{ inputs.platform }}"
build_type="${{ inputs.build_type }}"
case "$platform:$build_type" in
ANDROID:StaticBuild|TERMUX:StaticBuild|X64:StaticBuild)
echo "::error::$platform does not support $build_type"
exit 1
;;
ANDROID:Box32|TERMUX:Box32)
echo "::error::$platform does not support $build_type"
exit 1
;;
ANDROID:Trace|TERMUX:Trace|LARCH64:Trace|PPC64LE:Trace)
echo "::error::$platform does not support $build_type"
exit 1
;;
WOW64:Trace|WOW64:StaticBuild|WOW64:Box32)
echo "::error::$platform does not support $build_type"
exit 1
;;
esac
echo "Selected platform: $platform"
echo "Selected build type: $build_type"
build:
name: Build ${{ inputs.platform }} / ${{ inputs.build_type }}
needs: validate
runs-on: ${{ (inputs.platform == 'RK3588' || inputs.platform == 'ARM64' || inputs.platform == 'ANDROID_GLIBC' || inputs.platform == 'WOW64') && 'ubuntu-22.04-arm' || 'ubuntu-latest' }}
steps:
- name: Checkout Box64 Repository
uses: actions/checkout@v4
- name: Environment Preparation
shell: bash
run: |
sudo apt-get update
platform="${{ inputs.platform }}"
build_type="${{ inputs.build_type }}"
echo "PLATFORM=$platform" >> "$GITHUB_ENV"
echo "BUILD_KIND=$build_type" >> "$GITHUB_ENV"
if [[ "$platform" != "X64" &&
"$platform" != "RISCV" &&
"$platform" != "LARCH64" &&
"$platform" != "PPC64LE" ]]; then
sudo apt-get -y install \
git cmake make python3 patchelf libzydis-dev
if [[ "$platform" == "ANDROID" || "$platform" == "TERMUX" ]]; then
sudo apt-get -y install p7zip
wget -q https://dl.google.com/android/repository/android-ndk-r26b-linux.zip
unzip -qq android-ndk-r26b-linux.zip
echo "BOX64_COMPILER=$PWD/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang" >> "$GITHUB_ENV"
echo "BOX64_PLATFORM_MACRO=-DANDROID=1 -DARM_DYNAREC=1 -DBAD_SIGNAL=1" >> "$GITHUB_ENV"
git clone https://github.com/termux/termux-docker.git
cd termux-docker
git checkout 148b93d989cbc572719e050135b3e13