From 011e8234e2abb066c18871f2b90f3f7e746d4a5d Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Tue, 29 Oct 2024 09:19:26 +0300 Subject: [PATCH] chore(ci): update CI workflows for compatibility and consistency (#74) - Updated action versions (`checkout@v4`, `upload-artifact@v4`, `download-artifact@v4`, `gh-release@v2`) for enhanced compatibility and security - Upgraded MSBuild setup action to `v2` - Switched to a Debian slim container for the Linux build to ensure compatibility - Simplified dependency installation on Linux and included multilib support for 32-bit builds - Removed unnecessary cleanup steps for temporary artifacts - Ensured consistent action versions across jobs and steps Co-authored-by: s1lentq --- .github/workflows/build.yml | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bb5833..6f06e17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,12 +24,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.1.3 + uses: microsoft/setup-msbuild@v2 - name: Build run: | @@ -44,7 +44,7 @@ jobs: move msvc\${{ env.buildRelease }}\metamod.pdb publish\debug\metamod.pdb - name: Deploy artifacts - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4 with: name: win32 path: publish/* @@ -52,17 +52,28 @@ jobs: linux: name: 'Linux' runs-on: ubuntu-latest - container: s1lentq/linux86buildtools:latest + container: debian:11-slim steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Build using Intel C++ Compiler 19.0 + - name: Install dependencies run: | - rm -rf build && CC=icc CXX=icpc cmake -DCMAKE_BUILD_TYPE=COMPAT_GLIBC -B build && cmake --build build -j8 + dpkg --add-architecture i386 + apt-get update + apt-get install -y \ + gcc-multilib g++-multilib \ + build-essential \ + libc6-dev libc6-dev-i386 \ + git cmake rsync \ + g++ gcc + + - name: Build using Intel GCC Compiler + run: | + rm -rf build && cmake -DCMAKE_BUILD_TYPE=COMPAT_GLIBC -B build && cmake --build build -j8 - name: Prepare SDK run: | @@ -98,17 +109,12 @@ jobs: shell: bash - name: Deploy artifacts - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4 id: upload-job with: name: linux32 path: publish/* - - name: Cleanup temporary artifacts - if: success() && steps.upload-job.outcome == 'success' - run: | - rm -f appversion.h - publish: name: 'Publish' runs-on: ubuntu-latest @@ -116,12 +122,12 @@ jobs: steps: - name: Deploying linux artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: linux32 - name: Deploying windows artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: win32 @@ -149,7 +155,7 @@ jobs: 7z a -tzip metamod-bin-${{ env.APP_VERSION }}.zip addons/ example_plugin/ sdk/ - name: Publish artifacts - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 id: publish-job if: | startsWith(github.ref, 'refs/tags/') && @@ -157,9 +163,3 @@ jobs: with: files: | *.zip - - - name: Cleanup temporary artifacts - if: success() && steps.publish-job.outcome == 'success' - run: | - rm -rf addons debug example_plugin sdk - rm -f *.zip appversion.h