mirror of
https://github.com/rehlds/metamod-r.git
synced 2025-01-13 23:28:23 +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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup MSBuild
|
- name: Setup MSBuild
|
||||||
uses: microsoft/setup-msbuild@v1.1.3
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@ -44,7 +44,7 @@ jobs:
|
|||||||
move msvc\${{ env.buildRelease }}\metamod.pdb publish\debug\metamod.pdb
|
move msvc\${{ env.buildRelease }}\metamod.pdb publish\debug\metamod.pdb
|
||||||
|
|
||||||
- name: Deploy artifacts
|
- name: Deploy artifacts
|
||||||
uses: actions/upload-artifact@v3.1.1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: win32
|
name: win32
|
||||||
path: publish/*
|
path: publish/*
|
||||||
@ -52,17 +52,28 @@ jobs:
|
|||||||
linux:
|
linux:
|
||||||
name: 'Linux'
|
name: 'Linux'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: s1lentq/linux86buildtools:latest
|
container: debian:11-slim
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Build using Intel C++ Compiler 19.0
|
- name: Install dependencies
|
||||||
run: |
|
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
|
- name: Prepare SDK
|
||||||
run: |
|
run: |
|
||||||
@ -98,17 +109,12 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Deploy artifacts
|
- name: Deploy artifacts
|
||||||
uses: actions/upload-artifact@v3.1.1
|
uses: actions/upload-artifact@v4
|
||||||
id: upload-job
|
id: upload-job
|
||||||
with:
|
with:
|
||||||
name: linux32
|
name: linux32
|
||||||
path: publish/*
|
path: publish/*
|
||||||
|
|
||||||
- name: Cleanup temporary artifacts
|
|
||||||
if: success() && steps.upload-job.outcome == 'success'
|
|
||||||
run: |
|
|
||||||
rm -f appversion.h
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: 'Publish'
|
name: 'Publish'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -116,12 +122,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Deploying linux artifacts
|
- name: Deploying linux artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux32
|
name: linux32
|
||||||
|
|
||||||
- name: Deploying windows artifacts
|
- name: Deploying windows artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: win32
|
name: win32
|
||||||
|
|
||||||
@ -149,7 +155,7 @@ jobs:
|
|||||||
7z a -tzip metamod-bin-${{ env.APP_VERSION }}.zip addons/ example_plugin/ sdk/
|
7z a -tzip metamod-bin-${{ env.APP_VERSION }}.zip addons/ example_plugin/ sdk/
|
||||||
|
|
||||||
- name: Publish artifacts
|
- name: Publish artifacts
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
id: publish-job
|
id: publish-job
|
||||||
if: |
|
if: |
|
||||||
startsWith(github.ref, 'refs/tags/') &&
|
startsWith(github.ref, 'refs/tags/') &&
|
||||||
@ -157,9 +163,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
*.zip
|
*.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…
x
Reference in New Issue
Block a user