Update actions
Some checks failed
CI/CD / Linux-x86-clang++ (push) Successful in 1m44s
CI/CD / Linux-x86-g++ (push) Successful in 1m55s
CI/CD / Release (push) Failing after 15s

This commit is contained in:
Lauri Räsänen 2025-01-06 19:29:24 +02:00
parent 7e2eab104b
commit 8099645629
2 changed files with 59 additions and 81 deletions

View file

@ -0,0 +1,59 @@
name: CI/CD
on: [push, pull_request]
jobs:
build-linux:
name: Linux-x86-${{ matrix.compiler }}
runs-on: node-bookworm
strategy:
matrix:
compiler: [g++, clang++]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt install -y sudo g++-multilib clang libgl1-mesa-dev
- name: Build
run: |
cd linux
make COMPILER=${{ matrix.compiler }} CFG=release
- name: Package
run: |
cp -r linux/release/cl_dlls photomode/cl_dlls
cp -r linux/release/dlls photomode/dlls
- name: Deploy
uses: forgejo/upload-artifact@v4
with:
name: Linux-x86-${{ matrix.compiler }}-${{ github.sha }}.zip
path: photomode
if-no-files-found: error
release:
name: Release
runs-on: node-bookworm
if: startsWith(github.ref, 'refs/tags/')
needs: build-linux
steps:
- uses: actions/checkout@v4 # needed for release action?
- name: Download artifacts
uses: forgejo/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Release
uses: actions/forgejo-release@v2
with:
url: https://code.nullprop.sh
direction: upload
release-dir: artifacts
tag: "${{ github.ref_name }}"
token: ${{ secrets.TOKEN }}

View file

@ -1,81 +0,0 @@
name: CI/CD
on: [push, pull_request]
jobs:
linux:
name: Linux-x86
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [g++, clang++]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install G++ Multilib, Clang++ & OpenGL library
run: |
sudo apt update
sudo apt install -y g++-multilib clang libgl1-mesa-dev
- name: Build
run: |
cd linux
make COMPILER=${{ matrix.compiler }} CFG=release -j2
- name: Package
run: |
cp -r linux/release/cl_dlls photomode/cl_dlls
cp -r linux/release/dlls photomode/dlls
zip -r photomode-linux.zip photomode
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: Linux-x86-${{ matrix.compiler }}-${{ github.sha }}
path: photomode
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: photomode-linux.zip
win32:
name: Win32
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x86
- name: Build
run: msbuild projects/vs2019/projects.sln -t:rebuild -property:Configuration=Release -maxcpucount:2
- name: Package
run: |
mkdir photomode\cl_dlls
mkdir photomode\dlls
copy projects\vs2019\Release\hl_cdll\client.dll photomode\cl_dlls\client.dll
copy projects\vs2019\Release\hl_cdll\client.pdb photomode\cl_dlls\client.pdb
copy projects\vs2019\Release\hldll\hl.dll photomode\dlls\hl.dll
copy projects\vs2019\Release\hldll\hl.pdb photomode\dlls\hl.pdb
Compress-Archive photomode photomode-windows.zip
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: Win32-${{ github.sha }}
path: photomode
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: photomode-windows.zip