Update actions
This commit is contained in:
parent
7e2eab104b
commit
78c21c653f
2 changed files with 62 additions and 81 deletions
62
.forgejo/workflows/ci-cd.yml
Normal file
62
.forgejo/workflows/ci-cd.yml
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
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 zip
|
||||||
|
|
||||||
|
- 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
|
||||||
|
zip -r photomode-linux-x86-${{ matrix.compiler }}.zip photomode/
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: forgejo/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: photomode-linux-x86-${{ matrix.compiler }}.zip
|
||||||
|
path: photomode-linux-x86-${{ matrix.compiler }}.zip
|
||||||
|
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
|
||||||
|
|
||||||
|
- run: ls -lah artifacts/
|
||||||
|
|
||||||
|
- 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 }}
|
81
.github/workflows/ci-cd.yml
vendored
81
.github/workflows/ci-cd.yml
vendored
|
@ -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
|
|
Loading…
Add table
Add a link
Reference in a new issue