Reduce optimised linux binary size #884
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build pushes and pull requests | |
on: | |
push: | |
branches-ignore: | |
- dev | |
tags-ignore: | |
- v* | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
- 'cfg/**' | |
- 'gamedata/**' | |
- 'translations/**' | |
jobs: | |
get-version-string: | |
name: Get version string | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set vars | |
id: vars | |
run: | | |
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
outputs: | |
short_sha: ${{ steps.vars.outputs.short_sha }} | |
check-newlines: | |
name: Check for CRLF and final newlines | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./scripts/check-newlines.sh | |
check-formatting: | |
name: Check for consistent formatting | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
path: | |
- check: 'src' | |
exclude: 'sdk' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jidicula/[email protected] | |
with: | |
clang-format-version: '16' | |
check-path: ${{ matrix.path['check'] }} | |
exclude-regex: ${{ matrix.path['exclude'] }} | |
build-push: | |
if: ${{ github.event_name == 'push' }} | |
name: Build Push | |
uses: ./.github/workflows/build.yaml | |
needs: get-version-string | |
with: | |
version: ${{ github.ref_name }}-${{ needs.get-version-string.outputs.short_sha }} | |
build-pr: | |
if: ${{ github.event_name == 'pull_request' }} | |
name: Build PR | |
uses: ./.github/workflows/build.yaml | |
needs: get-version-string | |
with: | |
version: pr-${{ github.ref_name }}-${{ needs.get-version-string.outputs.short_sha }} |