Skip to content

Stop using expensive foreach Pawn + PRL.FindPlayer loops #230

Stop using expensive foreach Pawn + PRL.FindPlayer loops

Stop using expensive foreach Pawn + PRL.FindPlayer loops #230

Workflow file for this run

name: Makefile build
on:
push:
tags:
- 'releases/v*'
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: (Get metadata)
id: metadata
run: |
source buildconfig.sh
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "build=$build" >> "$GITHUB_OUTPUT"
echo "package=$package" >> "$GITHUB_OUTPUT"
echo "name=$name" >> "$GITHUB_OUTPUT"
echo "debug=$debug" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: sudo apt install zip bzip2 gzip tar curl bash
- name: Cache build environment downloads
id: cache-downloads
uses: actions/cache@v2
with:
path: build/deps
key: ${{ runner.os }}-build-${{ hashFiles('deps.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Download build environment
if: steps.cache-downloads.outputs.cache-hit != 'true'
run: make download
- name: Set up build environment
run: make configure
- name: Build
run: make build
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.metadata.outputs.package }}-distrib-zip
path: build/dist/${{ steps.metadata.outputs.package }}/latest/*
if-no-files-found: error
publish:
name: Publish Tag Release (if applicable)
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/releases/v')
steps:
- name: Checkout
uses: actions/checkout@v2
- name: (Get metadata)
id: metadata
run: |
source buildconfig.sh
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "build=$build" >> "$GITHUB_OUTPUT"
echo "package=$package" >> "$GITHUB_OUTPUT"
echo "name=$name" >> "$GITHUB_OUTPUT"
echo "debug=$debug" >> "$GITHUB_OUTPUT"
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.metadata.outputs.package }}-distrib-zip
path: /tmp/distrib
- name: Release!
id: create_release
uses: softprops/action-gh-release@v1
with:
files: /tmp/distrib/*
tag_name: releases/v${{ steps.metadata.outputs.version }}
name: ${{ steps.metadata.outputs.name }} v${{ steps.metadata.outputs.version }}
body_path: latest-changes.md
draft: true
prerelease: ${{ steps.metadata.outputs.debug }}