|
|
@@ -7,6 +7,7 @@ on:
|
|
|
branches: [ master ]
|
|
|
|
|
|
jobs:
|
|
|
+# START LINUX BUILD JOB
|
|
|
build_linux64:
|
|
|
name: Build for Linux 64bit (Ubuntu)
|
|
|
runs-on: ubuntu-latest
|
|
|
@@ -25,7 +26,7 @@ jobs:
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
- name: Create temporary directories.
|
|
|
- - run: |
|
|
|
+ run: |
|
|
|
mkdir -p ${{ runner.workspace }}/ReleaseTemp/Release
|
|
|
mkdir -p ${{ runner.workspace }}/ReleaseTemp/Debug
|
|
|
|
|
|
@@ -67,7 +68,7 @@ jobs:
|
|
|
uses: actions/upload-artifact@v2
|
|
|
with:
|
|
|
name: Linux64-Debug-Binary
|
|
|
- path: ${{ runner.workspace }}/build/libenet.so
|
|
|
+ path: ${{ runner.workspace }}/build-debug/libenet.so
|
|
|
|
|
|
- name: Create a release
|
|
|
id: create_release
|
|
|
@@ -88,7 +89,6 @@ jobs:
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
with:
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
- # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
|
asset_path: ${{ runner.workspace }}/ReleaseTemp/Release.zip
|
|
|
asset_name: libenet-release-linux64.zip
|
|
|
asset_content_type: application/zip
|
|
|
@@ -100,12 +100,14 @@ jobs:
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
with:
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
- # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
|
asset_path: ${{ runner.workspace }}/ReleaseTemp/Debug.zip
|
|
|
asset_name: libenet-debug-linux64.zip
|
|
|
asset_content_type: application/zip
|
|
|
+# END LINUX BUILD JOB
|
|
|
|
|
|
+# START APPLE IOS BUILD JOB
|
|
|
build_apple_mobile:
|
|
|
+ name: Build for Apple iOS
|
|
|
needs: build_linux64
|
|
|
runs-on: macos-latest
|
|
|
steps:
|
|
|
@@ -126,12 +128,12 @@ jobs:
|
|
|
- name: Run repository build script in Release 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/enet/Build-iOS/build/Release-iphoneos/libenet.a
|
|
|
+ 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
|
|
|
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/enet/Build-iOS/build/Debug-iphoneos/libenet.a
|
|
|
+ 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
|
|
|
@@ -165,4 +167,5 @@ jobs:
|
|
|
upload_url: ${{ needs.build_linux64.outputs.create_release_url }}
|
|
|
asset_path: ${{ runner.workspace }}/temp/Debug/libenet.zip
|
|
|
asset_name: libenet-debug-iOS.zip
|
|
|
- asset_content_type: application/zip
|
|
|
+ asset_content_type: application/zip
|
|
|
+# END APPLE IOS BUILD JOB
|