Event definitions in Sphere.ini have been made more extensive. #108
Workflow file for this run
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
name: MacOS ARM | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'main' | |
- 'dev' | |
pull_request: | |
branches: | |
- 'master' | |
- 'main' | |
- 'dev' | |
jobs: | |
macos-arm64: | |
runs-on: macos-14 # apple silicon | |
env: | |
CMAKE_GEN: Ninja | |
#CMAKE_TCH: cmake/toolchains/OSX-AppleClang-native.cmake | |
CMAKE_TCH: cmake/toolchains/OSX-AppleClang-AArch64.cmake | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install prerequisites | |
run: | | |
sw_vers | |
echo && echo "** Setting up compiler" && echo | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
brew install ninja mariadb-connector-c | |
- name: Report building tools | |
run: | | |
echo "Apple Clang:" && clang --version | |
echo && echo "CMake:" && cmake --version | |
echo && echo "Ninja:" && ninja --version | |
- name: CMake | |
run: | | |
mkdir -p build | |
cmake -G "Ninja" -DCMAKE_BUILD_TYPE="Nightly" -DCMAKE_TOOLCHAIN_FILE="$CMAKE_TCH" -S . -B ./build | |
- name: Ninja | |
run: cd build && ninja && cd .. | |
- name: Create package | |
run: | | |
pwd | |
mkdir accounts logs save scripts | |
zip -rj SphereSvrX-osx-arm64-nightly.zip accounts/ logs/ save/ scripts/ src/sphere.ini src/sphereCrypt.ini build/bin-aarch64/* | |
# Upload artifact linked to the workflow run - only if the run is for a pull request, or for selected branches | |
- name: Upload artifact | |
if: contains(fromJson('["master", "main", "dev"]'), github.ref_name) || ${{ github.event_name == 'pull_request' }} | |
uses: actions/upload-artifact@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: Build-osx-arm64 | |
path: SphereSvrX-osx-arm64-nightly.zip | |
overwrite: true | |
upload_github_release: | |
needs: macos-arm64 | |
# Upload artifact linked to GitHub RELEASE we are creating - only if the run is for a pull request, or for selected branches | |
if: contains(fromJson('["master", "main"]'), github.ref_name) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download builds | |
uses: actions/download-artifact@v4 | |
with: | |
name: Build-osx-arm64 | |
merge-multiple: true | |
run-id: ${{ github.run_id }} | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: Nightly | |
tag_name: Nightly | |
prerelease: true | |
files: SphereSvrX-osx-arm64-nightly.zip | |
upload_selfhost_release: | |
needs: macos-arm64 | |
if: contains(fromJson('["master", "main"]'), github.ref_name) && (github.repository == 'SphereServer/Source-X') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download builds | |
uses: actions/download-artifact@v4 | |
with: | |
name: Build-osx-arm64 | |
merge-multiple: true | |
run-id: ${{ github.run_id }} | |
- name: Push release | |
run: | | |
curl -sST "{SphereSvrX-osx-arm64-nightly.zip}" -u ${{secrets.UP_USER}}:${{secrets.UP_PASS}} ${{secrets.UP_WHERE}} |