Build Depends and Submit #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "new_commits=$(cat new_commits.txt)" >> $GITHUB_OUTPUT | |
rm 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_access_point_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' |