mirror of
https://github.com/rehlds/metamod-r.git
synced 2024-12-25 14:15:31 +03:00
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 <s1lentsk@yandex.ru>
This commit is contained in:
parent
cedda15813
commit
011e8234e2
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user