-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (81 loc) · 3.27 KB
/
build_depends_and_submit.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
on:
schedule:
- cron: '00 00/12 * * *'
workflow_dispatch: {}
jobs:
Builder:
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Checkout Code From Local Repository
uses: actions/checkout@v4
with:
ref: 'ci_cd_auto_build_depends'
path: 'ci_cd_auto_build_depends'
- name: Checkout Code From Remote Repository
uses: actions/checkout@v4
with:
repository: 'bouldev/neo-omega-kernel'
path: 'neomega_kernel'
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Check for new commits
id: check_commits
run: |
pip install gitpython
python .github/check_for_new_commits.py
echo "::set-output name=new_commits::$(cat new_commits.txt)"
- name: Set Up Go
if: steps.check_commits.outputs.new_commits == 'true'
uses: actions/setup-go@v2
- name: Configure Raknet
if: steps.check_commits.outputs.new_commits == 'true'
run: |
mkdir configure_raknet_depends
cd configure_raknet_depends
go mod init configure_raknet_depends
go get github.com/sandertv/[email protected]
sudo sed -i "" "s/urrentProtocol byte = 11/urrentProtocol byte = 8/g" /Users/runner/go/pkg/mod/github.com/sandertv/[email protected]/conn.go
- name: Configure Makefile
if: steps.check_commits.outputs.new_commits == 'true'
run: mv ci_cd_auto_build_depends/Makefile neomega_kernel/neomega/c_api
- name: Install Dependencies
if: steps.check_commits.outputs.new_commits == 'true'
run: |
brew install mingw-w64
brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu
brew install messense/macos-cross-toolchains/aarch64-unknown-linux-gnu
brew install android-ndk
brew install make
- name: Build Connect Library
if: steps.check_commits.outputs.new_commits == 'true'
run: |
cd neomega_kernel/neomega/c_api
make all
rm -rf libs/*.h
- name: Build Access Point
if: steps.check_commits.outputs.new_commits == 'true'
run: |
cd neomega_kernel/neomega/entries/access_point_entry/cli
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/neomega_linux_access_point_amd64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o build/neomega_windows_access_point_amd64.exe
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o build/neomega_linux_access_point_arm64
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -o build/neomega_windows_access_point_arm64.exe
CGO_ENABLED=0 GOOS=android GOARCH=arm64 go build -o build/neomega_android_arm64
- name: Move Binary Files and Clean Up
if: steps.check_commits.outputs.new_commits == 'true'
run: |
mv neomega_kernel/neomega/c_api/libs/* ./
mv neomega_kernel/neomega/entries/access_point_entry/cli/build/* ./
rm -rf configure_raknet_depends
rm -rf ci_cd_auto_build_depends
rm -rf neomega_kernel
- name: Submit Changes
if: steps.check_commits.outputs.new_commits == 'true'
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: '[AUTO] build depends and submit'