From d575d7df57c9e944582918c8bc78e4cf23fecd31 Mon Sep 17 00:00:00 2001 From: Matt Coburn Date: Tue, 8 Sep 2020 20:26:00 +1000 Subject: [PATCH] Fuck YAML. --- .github/workflows/Build-Master.yaml | 56 +++++++++++------------------ AutoBuild/githubAutoBuild.cmd | 42 ++++++++++++++++++++++ 2 files changed, 63 insertions(+), 35 deletions(-) create mode 100644 AutoBuild/githubAutoBuild.cmd diff --git a/.github/workflows/Build-Master.yaml b/.github/workflows/Build-Master.yaml index ecd302c..9da88ce 100644 --- a/.github/workflows/Build-Master.yaml +++ b/.github/workflows/Build-Master.yaml @@ -88,7 +88,23 @@ jobs: asset_content_type: application/zip # END LINUX BUILD JOB -# START WINDOWS BUILD JOB +# START APPLE MACOS BUILD JOB + build_apple_64: + name: Build for MacOS + needs: create_release + runs-on: macos-latest + steps: + - name: Setup Xcode (with latest Apple SDK) + uses: maxim-lobanov/setup-xcode@1.0 + with: + xcode-version: 11.6 + + - name: Grab the latest copy of the repository. + uses: actions/checkout@v2 + + # Stubbed! +# END APPLE MACOS BUILD JOB + build_windows_64: name: Build for Windows x64 needs: create_release @@ -97,22 +113,11 @@ jobs: - name: Grab the latest copy of the repository. uses: actions/checkout@v2 - - name: Housekeeping + - name: Run automated build script run: | - mkdir ${{ runner.workspace }}\DebugOut - mkdir ${{ runner.workspace }}\ReleaseOut + cd ${{ runner.workspace }}\ENet-CSharp && &.\Autobuild\githubAutobuild.cmd - - name: Build Enet DLLs - run: | - cd ${{ runner.workspace }}\ENet-CSharp - echo Clean && dotnet clean - echo Build && dotnet build - copy "${{ runner.workspace }}\ENet-CSharp\Unity\Plugins\x86_64\enet.dll" "${{ runner.workspace }}\DebugOut" - echo Clean && dotnet clean - echo Build && dotnet build -c Release - copy "${{ runner.workspace }}\ENet-CSharp\Unity\Plugins\x86_64\enet.dll" "${{ runner.workspace }}\ReleaseOut" - - - name: Upload release library + - name: Upload release library id: upload-release-asset uses: actions/upload-release-asset@v1 env: @@ -130,28 +135,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create_release.outputs.create_release_url }} - asset_path: ${{ runner.workspace }}/ReleaseTemp/Debug.zip + asset_path: ${{ runner.workspace }}/DebugOut/Debug.zip asset_name: libenet-debug-win64.zip asset_content_type: application/zip -# END WINDOWS BUILD JOB - -# START APPLE MACOS BUILD JOB - build_apple_64: - name: Build for MacOS - needs: create_release - runs-on: macos-latest - steps: - - name: Setup Xcode (with latest Apple SDK) - uses: maxim-lobanov/setup-xcode@1.0 - with: - xcode-version: 11.6 - - - name: Grab the latest copy of the repository. - uses: actions/checkout@v2 - - # Stubbed! -# END APPLE MACOS BUILD JOB - # START APPLE IOS BUILD JOB build_apple_mobile: name: Build for Apple iOS diff --git a/AutoBuild/githubAutoBuild.cmd b/AutoBuild/githubAutoBuild.cmd new file mode 100644 index 0000000..4971e0d --- /dev/null +++ b/AutoBuild/githubAutoBuild.cmd @@ -0,0 +1,42 @@ +@echo off +rem Oh hey there. Coburn here. +rem You might be thinking what's this file gotta +rem do with ENet? Well, let's just say I've got +rem the shits with the fucking GitHub actions +rem system. Syntax error without any fucking additional +rem information. No "expecting ..." or "... not allowed here", +rem just fucking syntax error, lol. And there's no Github-flavoured +rem YAML parsers online, so yeah. Poor 'ol me can't figure it out. +rem +rem Anyway, that ends here. What this script does is mainly runs +rem the build process as part of the CI pipeline. Hopefully that +rem means I can just use this script to run the Microsoft Windows +rem builds, because I've had the shits as mentioned above trying to +rem use YAML files. YAML can GTFO until further notice. +set %_OutputFolder%=%1 +PATH=C:\Program Files\7-Zip;%PATH% + +rem Make release and debug folders. +mkdir %_OutputFolder%\ReleaseOut +mkdir %_OutputFolder%\DebugOut + +echo Preparing Debug Build +dotnet clean +dotnet build + +echo Stashing... +copy Unity\Plugins\x86_64\enet.dll %_OutputFolder%\DebugOut + +echo Preparing Release Build +dotnet clean +dotnet build -c Release + +echo Stashing... +copy Unity\Plugins\x86_64\enet.dll %_OutputFolder%\ReleaseOut + +echo Compressing... +cd %_OutputFolder%\ReleaseOut +7z a %_OutputFolder%\DebugOut\Debug.zip %_OutputFolder%\DebugOut\enet.dll +7z a %_OutputFolder%\ReleaseOut\Release.zip %_OutputFolder%\ReleaseOut\enet.dll + +echo BUILD SCRIPT EXITING \ No newline at end of file