halflife-photomode/.forgejo/workflows/ci-cd.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-15 16:30:42 +02:00
name: CI/CD
on: [push, pull_request]
jobs:
linux:
2025-01-11 22:14:31 +02:00
name: Linux-x86-${{ matrix.compiler }}
2025-01-11 20:49:30 +02:00
runs-on: node-bookworm
2022-08-15 21:59:53 +02:00
strategy:
matrix:
compiler: [g++, clang++]
2022-08-15 16:30:42 +02:00
steps:
- name: Checkout
2024-05-03 16:06:04 +02:00
uses: actions/checkout@v4
2022-08-15 16:30:42 +02:00
2025-01-11 20:46:44 +02:00
- name: Install dependencies
2022-08-15 16:30:42 +02:00
run: |
2025-01-11 20:46:44 +02:00
apt update
apt install -y sudo g++-multilib clang libgl1-mesa-dev
2022-08-15 16:30:42 +02:00
- name: Build
run: |
cd linux
2025-01-11 21:00:38 +02:00
make COMPILER=${{ matrix.compiler }} CFG=release
2024-10-05 20:26:50 +03:00
- name: Package
run: |
cp -r linux/release/cl_dlls photomode/cl_dlls
cp -r linux/release/dlls photomode/dlls
2022-08-15 16:56:56 +02:00
- name: Deploy
2025-01-11 21:05:51 +02:00
uses: forgejo/upload-artifact@v4
2022-08-15 16:56:56 +02:00
with:
2024-10-05 20:26:50 +03:00
name: Linux-x86-${{ matrix.compiler }}-${{ github.sha }}
2025-01-11 23:32:50 +02:00
path: photomode/
if-no-files-found: error
2024-10-05 20:26:50 +03:00
- name: Release
2025-01-06 19:40:51 +02:00
uses: actions/forgejo-release@v2
2024-10-05 20:32:25 +03:00
if: startsWith(github.ref, 'refs/tags/')
2024-10-05 20:26:50 +03:00
with:
2025-01-06 19:40:51 +02:00
url: https://code.nullprop.sh
2025-01-11 20:46:44 +02:00
direction: upload
2025-01-11 21:00:38 +02:00
release-dir: photomode
2025-01-11 22:30:52 +02:00
tag: "${{ github.ref_name }}"
token: ${{ secrets.TOKEN }}