From a88b5d46c887c8ccf9deb0f7762462966d545000 Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Mon, 24 Apr 2023 13:03:25 +0200 Subject: [PATCH 1/2] workflows: Exclude game libraries from 'content' archive --- .github/workflows/New-Dist-Release.yaml | 60 +++++++++++++++++++------ 1 file changed, 47 insertions(+), 13 deletions(-) diff --git a/.github/workflows/New-Dist-Release.yaml b/.github/workflows/New-Dist-Release.yaml index ecbc2f37..4d72d2bb 100644 --- a/.github/workflows/New-Dist-Release.yaml +++ b/.github/workflows/New-Dist-Release.yaml @@ -53,19 +53,6 @@ jobs: # run: | # find -type f \( -not -name "checksums" \) -exec md5sum '{}' \; > checksums - - name: Download all library files for Windows, Linux and Linux ARM - run: | - for FILE in tng-win-64 tng-lin-x86_64 tng-lin-arm64 tng-darwin-x86_64 tng-darwin-arm64; \ - do wget -qnv https://github.com/actionquake/aq2-tng/releases/latest/download/${FILE}.zip \ - && unzip -o ${FILE}.zip -d ${{ env.DIST_DIR }}/baseaq/ \ - && unzip -o ${FILE}.zip -d ${{ env.DIST_DIR }}/action/; \ - rm -rf ${FILE}.zip; done - - - name: Make all libraries executable - run: | - chmod +x ${{ env.DIST_DIR }}/baseaq/game* - chmod +x ${{ env.DIST_DIR }}/action/game* - - name: Copy content run: | cp ${{ env.DIST_DIR }}/LICENSE ${{ env.AQTION_DIR }} @@ -153,6 +140,14 @@ jobs: name: aqtion-${{github.ref_name}}-content-only path: ${{ env.AQTION_DIR }} + - name: Download library files for Windows + run: | + for FILE in tng-win-64; \ + do wget -qnv https://github.com/actionquake/aq2-tng/releases/latest/download/${FILE}.zip \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/baseaq/ \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/action/; \ + rm -rf ${FILE}.zip; done + - name: Download and extract latest Windows Q2Pro Release run: | wget -qnv https://github.com/actionquake/q2pro/releases/latest/download/q2pro-msvc-x64.zip @@ -203,6 +198,19 @@ jobs: name: aqtion-${{github.ref_name}}-content-only path: ${{ env.AQTION_DIR }} + - name: Download library files for Linux x86_64 + run: | + for FILE in tng-lin-x86_64; \ + do wget -qnv https://github.com/actionquake/aq2-tng/releases/latest/download/${FILE}.zip \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/baseaq/ \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/action/; \ + rm -rf ${FILE}.zip; done + + - name: Make all libraries executable + run: | + chmod +x ${{ env.AQTION_DIR }}/baseaq/game* + chmod +x ${{ env.AQTION_DIR }}/action/game* + - name: Download and extract latest Linux x64 Q2Pro Release run: | mkdir -p wayland x11 @@ -258,6 +266,19 @@ jobs: name: aqtion-${{github.ref_name}}-content-only path: ${{ env.AQTION_DIR }} + - name: Download all library files for Linux ARM + run: | + for FILE in tng-lin-arm64; \ + do wget -qnv https://github.com/actionquake/aq2-tng/releases/latest/download/${FILE}.zip \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/baseaq/ \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/action/; \ + rm -rf ${FILE}.zip; done + + - name: Make all libraries executable + run: | + chmod +x ${{ env.AQTION_DIR }}/baseaq/game* + chmod +x ${{ env.AQTION_DIR }}/action/game* + - name: Download and extract latest Linux arm64 Q2Pro Release run: | wget -qnv https://github.com/actionquake/q2pro/releases/latest/download/q2pro-lin-arm64.zip @@ -310,6 +331,19 @@ jobs: name: aqtion-${{github.ref_name}}-content-only path: ${{ env.AQTION_DIR }} + - name: Download all library files for Mac + run: | + for FILE in tng-darwin-x86_64 tng-darwin-arm64; \ + do wget -qnv https://github.com/actionquake/aq2-tng/releases/latest/download/${FILE}.zip \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/baseaq/ \ + && unzip -o ${FILE}.zip -d ${{ env.AQTION_DIR }}/action/; \ + rm -rf ${FILE}.zip; done + + - name: Make all libraries executable + run: | + chmod +x ${{ env.AQTION_DIR }}/baseaq/game* + chmod +x ${{ env.AQTION_DIR }}/action/game* + - name: Download and extract latest Mac x86_64 Q2Pro run: | mkdir x86_64 From dfb80d296e32db4c721524d04d7d3174ed71d5b6 Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Mon, 24 Apr 2023 20:03:57 +0200 Subject: [PATCH 2/2] workflows: Create a separate 'content-data' archive as a base for platform packages ...but keep 'content-only' as a package with all data + game libraries --- .github/workflows/New-Dist-Release.yaml | 60 +++++++++++++++++++++---- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/.github/workflows/New-Dist-Release.yaml b/.github/workflows/New-Dist-Release.yaml index 4d72d2bb..8256392a 100644 --- a/.github/workflows/New-Dist-Release.yaml +++ b/.github/workflows/New-Dist-Release.yaml @@ -11,7 +11,7 @@ env: name: Distribution Release jobs: - content_only: + content_data: runs-on: ubuntu-22.04 steps: - name: Checkout distrib @@ -53,6 +53,48 @@ jobs: # run: | # find -type f \( -not -name "checksums" \) -exec md5sum '{}' \; > checksums + - name: Copy content + run: | + cp ${{ env.DIST_DIR }}/LICENSE ${{ env.AQTION_DIR }} + cp -r ${{ env.DIST_DIR }}/baseaq/* aqtion/baseaq/ + cp -r ${{ env.DIST_DIR }}/action/* aqtion/action/ + + - name: Upload aqtion content artifact + uses: actions/upload-artifact@v3 + with: + name: aqtion-${{github.ref_name}}-content-data + path: | + ${{ env.AQTION_DIR }} + + content_only: + needs: content_data + runs-on: ubuntu-22.04 + steps: + - name: Checkout distrib + uses: actions/checkout@v3 + with: + repository: actionquake/distrib + path: ${{ env.DIST_DIR }} + + - name: Get aqtion-content + uses: actions/download-artifact@v3 + with: + name: aqtion-${{github.ref_name}}-content-data + path: ${{ env.AQTION_DIR }} + + - name: Download all library files for Windows, Linux and Linux ARM + run: | + for FILE in tng-win-64 tng-lin-x86_64 tng-lin-arm64 tng-darwin-x86_64 tng-darwin-arm64; \ + do wget -qnv https://github.com/actionquake/aq2-tng/releases/latest/download/${FILE}.zip \ + && unzip -o ${FILE}.zip -d ${{ env.DIST_DIR }}/baseaq/ \ + && unzip -o ${FILE}.zip -d ${{ env.DIST_DIR }}/action/; \ + rm -rf ${FILE}.zip; done + + - name: Make all libraries executable + run: | + chmod +x ${{ env.DIST_DIR }}/baseaq/game* + chmod +x ${{ env.DIST_DIR }}/action/game* + - name: Copy content run: | cp ${{ env.DIST_DIR }}/LICENSE ${{ env.AQTION_DIR }} @@ -126,7 +168,7 @@ jobs: aqtion-${{github.ref_name}}-linux-x86_64.deb win_x86_64_dist: - needs: content_only + needs: content_data runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -137,7 +179,7 @@ jobs: - name: Get aqtion-content uses: actions/download-artifact@v3 with: - name: aqtion-${{github.ref_name}}-content-only + name: aqtion-${{github.ref_name}}-content-data path: ${{ env.AQTION_DIR }} - name: Download library files for Windows @@ -184,7 +226,7 @@ jobs: aqtion-${{github.ref_name}}-windows-x86_64.zip lin_x86_64_dist: - needs: content_only + needs: content_data runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -195,7 +237,7 @@ jobs: - name: Get aqtion-content uses: actions/download-artifact@v3 with: - name: aqtion-${{github.ref_name}}-content-only + name: aqtion-${{github.ref_name}}-content-data path: ${{ env.AQTION_DIR }} - name: Download library files for Linux x86_64 @@ -252,7 +294,7 @@ jobs: aqtion-${{github.ref_name}}-linux-x86_64.zip lin_arm64_dist: - needs: content_only + needs: content_data runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -263,7 +305,7 @@ jobs: - name: Get aqtion-content uses: actions/download-artifact@v3 with: - name: aqtion-${{github.ref_name}}-content-only + name: aqtion-${{github.ref_name}}-content-data path: ${{ env.AQTION_DIR }} - name: Download all library files for Linux ARM @@ -316,7 +358,7 @@ jobs: aqtion-${{github.ref_name}}-linux-arm64.zip mac_dist: - needs: content_only + needs: content_data runs-on: macos-latest steps: - name: Checkout distrib @@ -328,7 +370,7 @@ jobs: - name: Get aqtion-content uses: actions/download-artifact@v3 with: - name: aqtion-${{github.ref_name}}-content-only + name: aqtion-${{github.ref_name}}-content-data path: ${{ env.AQTION_DIR }} - name: Download all library files for Mac