|
|
@@ -2,35 +2,37 @@ name: Master Build
|
|
|
|
|
|
on:
|
|
|
push:
|
|
|
- branches: [ master ]
|
|
|
- pull_request:
|
|
|
- branches: [ master ]
|
|
|
+# Leaving this here for classic build behaviour;
|
|
|
+# May want to go back to a build per commit at some point.
|
|
|
+# branches: [ master ]
|
|
|
+ tags:
|
|
|
+ - 'build-ready'
|
|
|
|
|
|
jobs:
|
|
|
# START LINUX BUILD JOB
|
|
|
build_linux64:
|
|
|
- name: Build for Linux 64bit (Ubuntu)
|
|
|
+ name: Prepare and build a Linux64 library.
|
|
|
runs-on: ubuntu-latest
|
|
|
outputs:
|
|
|
build_number: ${{ steps.buildnumber.outputs.build_number }}
|
|
|
create_release_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
- steps:
|
|
|
-
|
|
|
- - name: Generate build number
|
|
|
+ steps:
|
|
|
+
|
|
|
+ - name: Generate a new build number.
|
|
|
id: buildnumber
|
|
|
uses: einaregilsson/build-number@v2
|
|
|
with:
|
|
|
token: ${{secrets.github_token}}
|
|
|
|
|
|
- - name: Checkout code
|
|
|
+ - name: Grab the latest copy of the repository.
|
|
|
uses: actions/checkout@v2
|
|
|
-
|
|
|
- - name: Create temporary directories.
|
|
|
+
|
|
|
+ - name: Create temporary staging directories.
|
|
|
run: |
|
|
|
mkdir -p ${{ runner.workspace }}/ReleaseTemp/Release
|
|
|
mkdir -p ${{ runner.workspace }}/ReleaseTemp/Debug
|
|
|
|
|
|
- - name: Run CMake to configure and create a Release build
|
|
|
+ - name: CMake: Configure and build release binary.
|
|
|
uses: ashutoshvarma/action-cmake-build@master
|
|
|
with:
|
|
|
build-dir: ${{ runner.workspace }}/build-release
|
|
|
@@ -39,18 +41,7 @@ jobs:
|
|
|
build-type: Release
|
|
|
configure-options: -DENET_DEBUG=0
|
|
|
|
|
|
- - name: Stash compiled library
|
|
|
- run: |
|
|
|
- cp ${{ runner.workspace }}/build-release/libenet.so ${{ runner.workspace }}/ReleaseTemp/Release/libenet.so
|
|
|
- zip -j -9 ${{ runner.workspace }}/ReleaseTemp/Release.zip ${{ runner.workspace }}/ReleaseTemp/Release/libenet.so
|
|
|
-
|
|
|
- - name: Upload release build artifact
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
- with:
|
|
|
- name: Linux64-Release-Binary
|
|
|
- path: ${{ runner.workspace }}/build-release/libenet.so
|
|
|
-
|
|
|
- - name: Run CMake to configure and create a Debug build.
|
|
|
+ - name: CMake: Configure and build debug build.
|
|
|
uses: ashutoshvarma/action-cmake-build@master
|
|
|
with:
|
|
|
build-dir: ${{ runner.workspace }}/build-debug
|
|
|
@@ -59,18 +50,27 @@ jobs:
|
|
|
build-type: Debug
|
|
|
configure-options: -DENET_DEBUG=1
|
|
|
|
|
|
- - name: Stash compiled library
|
|
|
+
|
|
|
+ - name: Stash compiled libraries
|
|
|
run: |
|
|
|
+ cp ${{ runner.workspace }}/build-release/libenet.so ${{ runner.workspace }}/ReleaseTemp/Release/libenet.so
|
|
|
cp ${{ runner.workspace }}/build-debug/libenet.so ${{ runner.workspace }}/ReleaseTemp/Debug/libenet.so
|
|
|
+ zip -j -9 ${{ runner.workspace }}/ReleaseTemp/Release.zip ${{ runner.workspace }}/ReleaseTemp/Release/libenet.so
|
|
|
zip -j -9 ${{ runner.workspace }}/ReleaseTemp/Debug.zip ${{ runner.workspace }}/ReleaseTemp/Debug/libenet.so
|
|
|
|
|
|
- - name: Upload debug build artifact
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
- with:
|
|
|
- name: Linux64-Debug-Binary
|
|
|
- path: ${{ runner.workspace }}/build-debug/libenet.so
|
|
|
-
|
|
|
- - name: Create a release
|
|
|
+# - name: Upload release build artifact
|
|
|
+# uses: actions/upload-artifact@v2
|
|
|
+# with:
|
|
|
+# name: Linux64-Release-Binary
|
|
|
+# path: ${{ runner.workspace }}/build-release/libenet.so
|
|
|
+#
|
|
|
+# - name: Upload debug build artifact
|
|
|
+# uses: actions/upload-artifact@v2
|
|
|
+# with:
|
|
|
+# name: Linux64-Debug-Binary
|
|
|
+# path: ${{ runner.workspace }}/build-debug/libenet.so
|
|
|
+
|
|
|
+ - name: Create release on repository
|
|
|
id: create_release
|
|
|
uses: actions/create-release@v1
|
|
|
env:
|
|
|
@@ -78,11 +78,11 @@ jobs:
|
|
|
with:
|
|
|
tag_name: build-number-${{ steps.buildnumber.outputs.build_number }}
|
|
|
release_name: ENET Native Libraries (Autobuild ${{ steps.buildnumber.outputs.build_number }})
|
|
|
- body: This is an automatic build of ENET for various operating systems. Please do not mix and match ENET native binaries as code differences between forks may cause crashes. The release archive contains one for use in shipping, while the debug archive has logging facilities.
|
|
|
+ body: This is an automated build of the Enet native libraries. It is up to date with the latest build-ready tagged commit. Please do not mix and match ENET native binaries as code differences between forks may cause crashes. The release archive contains one for use in shipping, while the debug archive has logging facilities.
|
|
|
draft: false
|
|
|
prerelease: false
|
|
|
|
|
|
- - name: Upload Release Asset
|
|
|
+ - name: Release: Upload release library
|
|
|
id: upload-release-asset
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
env:
|
|
|
@@ -93,7 +93,7 @@ jobs:
|
|
|
asset_name: libenet-release-linux64.zip
|
|
|
asset_content_type: application/zip
|
|
|
|
|
|
- - name: Upload Debug Asset
|
|
|
+ - name: Release: Upload debug library
|
|
|
id: upload-debug-asset
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
env:
|
|
|
@@ -105,6 +105,14 @@ jobs:
|
|
|
asset_content_type: application/zip
|
|
|
# END LINUX BUILD JOB
|
|
|
|
|
|
+# START WINDOWS BUILD JOB
|
|
|
+
|
|
|
+# END WINDOWS BUILD JOB
|
|
|
+
|
|
|
+# START APPLE MACOS BUILD JOB
|
|
|
+
|
|
|
+# END APPLE MACOS BUILD JOB
|
|
|
+
|
|
|
# START APPLE IOS BUILD JOB
|
|
|
build_apple_mobile:
|
|
|
name: Build for Apple iOS
|
|
|
@@ -112,42 +120,42 @@ jobs:
|
|
|
runs-on: macos-latest
|
|
|
steps:
|
|
|
|
|
|
- - name: Setup XCode (with latest Apple SDK)
|
|
|
+ - name: Setup Xcode (with latest Apple SDK)
|
|
|
uses: maxim-lobanov/[email protected]
|
|
|
with:
|
|
|
xcode-version: latest
|
|
|
|
|
|
- - name: Checkout Code
|
|
|
+ - name: Grab the latest copy of the repository.
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
- - name: Make temp directories.
|
|
|
+ - name: Create temporary staging directories.
|
|
|
run: |
|
|
|
mkdir -p ${{ runner.workspace }}/temp/Release
|
|
|
mkdir -p ${{ runner.workspace }}/temp/Debug
|
|
|
|
|
|
- - name: Run repository build script in Release mode
|
|
|
+ - name: Run iOS build script in production mode.
|
|
|
run: |
|
|
|
cd $GITHUB_WORKSPACE/Build-iOS ; chmod +x ./Build-iOS.command ; ./Build-iOS.command
|
|
|
zip -j -9 ${{ runner.workspace }}/temp/Release/libenet.zip $GITHUB_WORKSPACE/Build-iOS/build/Release-iphoneos/libenet.a
|
|
|
|
|
|
- - name: Run repository build script in Debug mode
|
|
|
+ - name: Run iOS build script in Debug mode
|
|
|
run: |
|
|
|
cd $GITHUB_WORKSPACE/Build-iOS; sed -i '' 's/BUILD_TYPE="Release"/BUILD_TYPE="Debug"/g' Build-iOS.command ; chmod +x ./Build-iOS.command ; ./Build-iOS.command
|
|
|
zip -j -9 ${{ runner.workspace }}/temp/Debug/libenet.zip $GITHUB_WORKSPACE/Build-iOS/build/Debug-iphoneos/libenet.a
|
|
|
|
|
|
- - name: Stash release build artifact
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
- with:
|
|
|
- name: iOS-enet-Release
|
|
|
- path: ${{ runner.workspace }}/temp/Release/libenet.zip
|
|
|
-
|
|
|
- - name: Stash debug build artifact
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
- with:
|
|
|
- name: iOS-enet-Debug
|
|
|
- path: ${{ runner.workspace }}/temp/Debug/libenet.zip
|
|
|
-
|
|
|
- - name: Upload Release Asset
|
|
|
+# - name: Stash release build artifact
|
|
|
+# uses: actions/upload-artifact@v2
|
|
|
+# with:
|
|
|
+# name: enet-iOS-Release
|
|
|
+# path: ${{ runner.workspace }}/temp/Release/libenet.zip
|
|
|
+#
|
|
|
+# - name: Stash debug build artifact
|
|
|
+# uses: actions/upload-artifact@v2
|
|
|
+# with:
|
|
|
+# name: enet-iOS-Debug
|
|
|
+# path: ${{ runner.workspace }}/temp/Debug/libenet.zip
|
|
|
+
|
|
|
+ - name: Release: Upload release library
|
|
|
id: upload-release-asset
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
env:
|
|
|
@@ -158,7 +166,7 @@ jobs:
|
|
|
asset_name: libenet-release-iOS.zip
|
|
|
asset_content_type: application/zip
|
|
|
|
|
|
- - name: Upload Debug Asset
|
|
|
+ - name: Release: Upload debug library
|
|
|
id: upload-debug-asset
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
env:
|
|
|
@@ -168,4 +176,10 @@ jobs:
|
|
|
asset_path: ${{ runner.workspace }}/temp/Debug/libenet.zip
|
|
|
asset_name: libenet-debug-iOS.zip
|
|
|
asset_content_type: application/zip
|
|
|
-# END APPLE IOS BUILD JOB
|
|
|
+# END APPLE IOS BUILD JOB
|
|
|
+
|
|
|
+# end of build jobs.
|
|
|
+
|
|
|
+# START ANDROID BUILD JOB
|
|
|
+
|
|
|
+# END ANDROID BUILD JOB
|