Files
jak-project/.github/workflows/linux-build-gcc.yaml
T
Tyler Wilding a66ec7c601 all-types: Improve Jak 2's all-types (#1728)
* all-types: improve all-types generation

* all-types: re-generate all-types

* tests: remove the test reporting feature

the format indeed doesn't work, and all current actions require too many permissions for forked PRs.

I'll make my own eventually that works properly (use the new markdown feature)

* all-types: put the states in the method table instead

* all-types: replace all `*time*...uint64` fields with `time-frame` type

* all-types: address feedback
2022-08-05 17:39:32 -04:00

67 lines
2.0 KiB
YAML

name: Linux Build GCC
on:
workflow_call:
inputs:
cmakePreset:
required: true
type: string
cachePrefix:
required: true
type: string
jobs:
build:
name: GCC
runs-on: ubuntu-20.04
timeout-minutes: 45
env: # overrides: https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md
BUILDCACHE_MAX_CACHE_SIZE: 1000000000 # 1gb
BUILDCACHE_COMPRESS_FORMAT: ZSTD
BUILDCACHE_COMPRESS_LEVEL: 19
BUILDCACHE_DIRECT_MODE: true
BUILDCACHE_LOG_FILE: ${{ github.workspace }}/buildcache.log
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Package Dependencies
run: >
sudo apt install build-essential cmake
clang gcc g++ lcov make nasm libxrandr-dev
libxinerama-dev libxcursor-dev libpulse-dev
libxi-dev zip ninja-build
- name: Setup Buildcache
uses: mikehardy/buildcache-action@v1.3.0
with:
cache_key: linux-ubuntu-20.04-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}
- name: CMake Generation
env:
CC: gcc
CXX: g++
run: |
cmake -B build --preset=${{ inputs.cmakePreset }} \
-DCODE_COVERAGE=ON \
-DCMAKE_C_COMPILER_LAUNCHER=${{ github.workspace }}/buildcache/bin/buildcache \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ github.workspace }}/buildcache/bin/buildcache
- name: Build Project
run: cmake --build build -j$((`nproc`+1)) -- -w dupbuild=warn
- name: Run Tests - With Coverage
working-directory: ./build
env:
GTEST_OUTPUT: "xml:opengoal-test-report.xml"
run: ninja goalc-test_coverage -w dupbuild=warn
- name: Submit Coverage Report to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
continue-on-error: true
with:
project-token: ${{ secrets.CODACY_PROJECT_KEY }}
coverage-reports: ./build/goalc-test_coverage.info