From e0aa4b8f7cbadc788c76a9d8a6db9ba5936d4a3c Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 08:17:59 -0300 Subject: [PATCH 1/7] Create workflow --- .github/workflows/kstrike-compile.yml | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/kstrike-compile.yml diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml new file mode 100644 index 000000000..f85556fc6 --- /dev/null +++ b/.github/workflows/kstrike-compile.yml @@ -0,0 +1,35 @@ +name: CI-Workflow +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + +defaults: + run: + shell: bash +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Preparing environment... + env: + DEBIAN_FRONTEND: "noninteractive" + run: apt update && apt upgrade -y && apt install -y git build-essential cmake libsdl2-mixer-dev libsdl2-dev libgoogle-perftools-dev libopenal-dev libcurlpp-dev libssl-dev libfontconfig1-dev libcurl4-openssl-dev net-tools wget unzip zip + - name: Building... + run: mkdir build && cd build && cmake .. && make -j2 -DUSE_KISAK_PHYSICS=1 -DUSE_ROCKETUI=1 && cd ${{env.GITHUB_WORKSPACE}} + - name: Preparing additional files... + run: git clone https://github.com/SwagSoftware/Kisak-Strike-Files && cp -r Kisak-Strike-Files/* ../game + - name: Compressing assets... + run: cd .. && zip -9 -r game-rocketui.zip game && rm -rf game && mv game-rocketui.zip ${{env.GITHUB_WORKSPACE}} && cd ${{env.GITHUB_WORKSPACE}} + - name: Publishing assets... + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./game-rocketui.zip + asset_name: Release-${{env.GITHUB_WORKSPACE}} + asset_content_type: application/zip From 8e83eff5b39f3a64b8a5b0026a9e8a8c0cf6456a Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 08:20:52 -0300 Subject: [PATCH 2/7] Update workflow file --- .github/workflows/kstrike-compile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml index f85556fc6..ce23652ba 100644 --- a/.github/workflows/kstrike-compile.yml +++ b/.github/workflows/kstrike-compile.yml @@ -17,7 +17,7 @@ jobs: - name: Preparing environment... env: DEBIAN_FRONTEND: "noninteractive" - run: apt update && apt upgrade -y && apt install -y git build-essential cmake libsdl2-mixer-dev libsdl2-dev libgoogle-perftools-dev libopenal-dev libcurlpp-dev libssl-dev libfontconfig1-dev libcurl4-openssl-dev net-tools wget unzip zip + run: sudo apt update && sudo apt upgrade -y && sudo apt install -y git build-essential cmake libsdl2-mixer-dev libsdl2-dev libgoogle-perftools-dev libopenal-dev libcurlpp-dev libssl-dev libfontconfig1-dev libcurl4-openssl-dev net-tools wget unzip zip - name: Building... run: mkdir build && cd build && cmake .. && make -j2 -DUSE_KISAK_PHYSICS=1 -DUSE_ROCKETUI=1 && cd ${{env.GITHUB_WORKSPACE}} - name: Preparing additional files... From 5d70c4c7138667d0cdb52f74928b964d1910a866 Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 08:25:24 -0300 Subject: [PATCH 3/7] Update workflow file v2 --- .github/workflows/kstrike-compile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml index ce23652ba..f601428d2 100644 --- a/.github/workflows/kstrike-compile.yml +++ b/.github/workflows/kstrike-compile.yml @@ -19,7 +19,7 @@ jobs: DEBIAN_FRONTEND: "noninteractive" run: sudo apt update && sudo apt upgrade -y && sudo apt install -y git build-essential cmake libsdl2-mixer-dev libsdl2-dev libgoogle-perftools-dev libopenal-dev libcurlpp-dev libssl-dev libfontconfig1-dev libcurl4-openssl-dev net-tools wget unzip zip - name: Building... - run: mkdir build && cd build && cmake .. && make -j2 -DUSE_KISAK_PHYSICS=1 -DUSE_ROCKETUI=1 && cd ${{env.GITHUB_WORKSPACE}} + run: mkdir build && cd build && cmake .. -DUSE_KISAK_PHYSICS=1 -DUSE_ROCKETUI=1 && make -j2 && cd ${{env.GITHUB_WORKSPACE}} - name: Preparing additional files... run: git clone https://github.com/SwagSoftware/Kisak-Strike-Files && cp -r Kisak-Strike-Files/* ../game - name: Compressing assets... From 91bf82c381dc2a1521e2083e98b43fb8ba562cd2 Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 08:27:31 -0300 Subject: [PATCH 4/7] Update workflow file v3 --- .github/workflows/kstrike-compile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml index f601428d2..8dee068f9 100644 --- a/.github/workflows/kstrike-compile.yml +++ b/.github/workflows/kstrike-compile.yml @@ -31,5 +31,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./game-rocketui.zip - asset_name: Release-${{env.GITHUB_WORKSPACE}} + asset_name: Release-${{env.GITHUB_RUN_ID}} asset_content_type: application/zip From 984efd3b00aca68315aa66777eb9e3e4c8fbdd6a Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 10:17:46 -0300 Subject: [PATCH 5/7] Add client and dedicated builds to release --- .github/workflows/kstrike-compile.yml | 41 +++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml index 8dee068f9..d504a80f7 100644 --- a/.github/workflows/kstrike-compile.yml +++ b/.github/workflows/kstrike-compile.yml @@ -1,3 +1,9 @@ +# This workflow does the following: +# 1) Compile everything (client and dedicated server) +# 2) Compress the binaries (because compression is cool) +# 3) Upload everything in a new release +# +# By default the binaries generated by this workflow are compiled using kisak-physics and RocketUI (client) by default name: CI-Workflow on: push: @@ -18,18 +24,41 @@ jobs: env: DEBIAN_FRONTEND: "noninteractive" run: sudo apt update && sudo apt upgrade -y && sudo apt install -y git build-essential cmake libsdl2-mixer-dev libsdl2-dev libgoogle-perftools-dev libopenal-dev libcurlpp-dev libssl-dev libfontconfig1-dev libcurl4-openssl-dev net-tools wget unzip zip - - name: Building... - run: mkdir build && cd build && cmake .. -DUSE_KISAK_PHYSICS=1 -DUSE_ROCKETUI=1 && make -j2 && cd ${{env.GITHUB_WORKSPACE}} + - name: Building client... + run: mkdir build && cd build && cmake .. -DUSE_KISAK_PHYSICS=1 -DUSE_ROCKETUI=1 && make -j2 && cd ${{ env.GITHUB_WORKSPACE }} - name: Preparing additional files... run: git clone https://github.com/SwagSoftware/Kisak-Strike-Files && cp -r Kisak-Strike-Files/* ../game - name: Compressing assets... - run: cd .. && zip -9 -r game-rocketui.zip game && rm -rf game && mv game-rocketui.zip ${{env.GITHUB_WORKSPACE}} && cd ${{env.GITHUB_WORKSPACE}} - - name: Publishing assets... + run: cd .. && zip -9 -r game_client-kphys.zip game && rm -rf game && cd ${{env.GITHUB_WORKSPACE}} + - name: Building dedicated... + run: mkdir build && cd build && cmake .. -DUSE_KISAK_PHYSICS=1 -DDEDICATED=1 && make -j2 && cd ${{ env.GITHUB_WORKSPACE }} + - name: Compressing assets... + run: cd .. && zip -9 -r game_dedicated-kphys.zip game && rm -rf game && cd ${{ env.GITHUB_WORKSPACE }} + - name: Create release + env: + GITHUB_TOKEN: ${{ github.token }} + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + release_name: Release-${{ env.GITHUB_RUN_ID }} + tag_name: ${{ github.ref }} + - name: Publish game client artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ../game_client-kphys.zip + asset_name: game_client-kphys.zip + asset_content_type: application/zip + - name: Publish game dedicated artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./game-rocketui.zip - asset_name: Release-${{env.GITHUB_RUN_ID}} + asset_path: ../game_dedicated-kphys.zip + asset_name: game_dedicated-kphys.zip asset_content_type: application/zip From f8755a011d0392bc2e76d543ba5fa705cd0d54c5 Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 10:31:48 -0300 Subject: [PATCH 6/7] Update workflow file v4 --- .github/workflows/kstrike-compile.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml index d504a80f7..d17d87b44 100644 --- a/.github/workflows/kstrike-compile.yml +++ b/.github/workflows/kstrike-compile.yml @@ -29,9 +29,9 @@ jobs: - name: Preparing additional files... run: git clone https://github.com/SwagSoftware/Kisak-Strike-Files && cp -r Kisak-Strike-Files/* ../game - name: Compressing assets... - run: cd .. && zip -9 -r game_client-kphys.zip game && rm -rf game && cd ${{env.GITHUB_WORKSPACE}} + run: cd .. && zip -9 -r game_client-kphys.zip game && rm -rf game && cd ${{ env.GITHUB_WORKSPACE }} - name: Building dedicated... - run: mkdir build && cd build && cmake .. -DUSE_KISAK_PHYSICS=1 -DDEDICATED=1 && make -j2 && cd ${{ env.GITHUB_WORKSPACE }} + run: cd build && cmake .. -DUSE_KISAK_PHYSICS=1 -DDEDICATED=1 && make -j2 && cd ${{ env.GITHUB_WORKSPACE }} - name: Compressing assets... run: cd .. && zip -9 -r game_dedicated-kphys.zip game && rm -rf game && cd ${{ env.GITHUB_WORKSPACE }} - name: Create release From a370d420466a3ca934334fc3072b0b6bad2ef612 Mon Sep 17 00:00:00 2001 From: PANCHO7532 <92986867+PANCHO7532B@users.noreply.github.com> Date: Thu, 11 Nov 2021 12:32:07 -0300 Subject: [PATCH 7/7] Update workflow file v5 --- .github/workflows/kstrike-compile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kstrike-compile.yml b/.github/workflows/kstrike-compile.yml index d17d87b44..b94693af5 100644 --- a/.github/workflows/kstrike-compile.yml +++ b/.github/workflows/kstrike-compile.yml @@ -42,7 +42,7 @@ jobs: with: draft: false prerelease: false - release_name: Release-${{ env.GITHUB_RUN_ID }} + release_name: Release-Linux tag_name: ${{ github.ref }} - name: Publish game client artifact uses: actions/upload-release-asset@v1