Skip to content

More misc cleanup in preperation for more plugins #14

More misc cleanup in preperation for more plugins

More misc cleanup in preperation for more plugins #14

name: Build everything
# TODO: Print hashes to ghactions "summary" info and/or setup some of the ghactions attestation shit...
# Steal from this maybe: https://github.com/zhongfly/mpv-winbuild/blob/main/.github/workflows/mpv.yml
# TODO: add another job that only builds sourcepawn files when only those are touched
on:
push:
paths: ['**.rs', '**.h', '**.hpp', '**.c', '**.cpp', '**.sp', '**.inc', '**.toml', '**.lock', '**.yml']
pull_request:
paths: ['**.rs', '**.h', '**.hpp', '**.c', '**.cpp', '**.sp', '**.inc', '**.toml', '**.lock', '**.yml']
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build_everything:
runs-on: windows-latest
steps:
- name: Prepare env
shell: bash
run: echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Install cargo-binstall
uses: cargo-bins/[email protected]
- name: Install the cargo bins we use...
shell: pwsh
run: |
cargo binstall -y cargo-make
cargo binstall -y cargo-zigbuild
# This is `cargo make full` but turned into steps so you can have better progress visibility
- name: Install Rust toolchains
run: |
cargo make rustup-linux
cargo make rustup-msvc
- name: Clone alliedmodders repositories
run: cargo make clone-alliedmodders
- name: Setup SourcePawn Compiler
uses: rumblefrog/[email protected]
with:
version: '1.12.7177' ### UPDATE Makefile.toml whenever this is updated.
- name: Setup Zig
uses: mlugg/setup-zig@v1
with:
version: '0.13.0' ### UPDATE Makefile.toml whenever this is updated.
- name: Build extensions for Linux
run: cargo make linux
- name: Build extensions for Windows/MSVC
run: cargo make msvc
- name: Copy things to _package
run: |
cargo make copy-srcwrtimer
cargo make copy-extensions
- name: Build plugins
run: cargo make compile-srcwrtimer-scripts
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: srcwrtimer-${{ github.head_ref || github.ref_name }}-${{ env.GITHUB_SHA_SHORT }}
path: _package/srcwrtimer