Skip to content

[Draft] Filesystem tests #285

[Draft] Filesystem tests

[Draft] Filesystem tests #285

Workflow file for this run

name: build tests
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- '.github/workflows/build.yml'
- '**/CMakeLists.txt'
- 'CMakeLists.txt'
- '**.cmake'
- '**.cpp'
- '**.cxx'
- '**.cc'
- '**.c'
- '**.hpp'
- '**.hh'
- '**.h'
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
formatting-check:
permissions:
contents: write
name: Formatting Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Test formatting
uses: DoozyX/clang-format-lint-action@8b8bbdd8669eec54682e720ebe2fb19d9387fdb0
with:
source: ./
exclude: ./third_party
extensions: h,hpp,cpp,c,cc
clangFormatVersion: 19
inplace: true
- name: Generate patch file
run: |
git diff > formatting.patch
find *.patch -type f -size 0 -delete
- name: Upload patch
uses: actions/upload-artifact@v4
with:
name: code-format
path: formatting.patch
if-no-files-found: ignore
- name: Error if fixed
run: |
if rm formatting.patch; then
echo "# Looks like you messed something up!" >> $GITHUB_STEP_SUMMARY
echo "1. Download the \`code-format\` artifact above" >> $GITHUB_STEP_SUMMARY
echo "2. Unpack the patch file" >> $GITHUB_STEP_SUMMARY
echo "3. Use \`git apply formatting.patch\` command to apply it to your repo" >> $GITHUB_STEP_SUMMARY
echo "4. Push the applied changes to your Pull Request" >> $GITHUB_STEP_SUMMARY
exit 1
fi
build:
needs: formatting-check
permissions:
contents: write
name: Build Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install prerequisites
run: |
sudo apt update -y
sudo apt install -y ninja-build clang-19 lld-19
wget http://azure.archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
- name: Configure project
run: |
echo "::add-matcher::.github/matchers/cmake.json"
cmake -S. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DOO_PS4_LINKER_SUFFIX=-19 -DOO_PS4_NOPKG=${{ 'OFF' }} -DCMAKE_TOOLCHAIN_FILE=OpenOrbis-tc.cmake
- name: Build project
env:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
run: |
echo "::add-matcher::.github/matchers/cmake.json"
echo "::add-matcher::.github/matchers/compilers.json"
cmake --build build -j4
- name: Upload project artifacts
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'push' }}
with:
name: ps4-integration-tests
path: |
./build/install/*
- name: Upload project artifacts (no pkg)
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'push' }}
with:
name: ps4-integration-tests-no-pkg
path: |
./build/install/*
!./build/install/**/*.pkg
- name: Create release archive
if: ${{ github.event_name == 'push' }}
working-directory: ./build/install/
run: 7z a -tzip ../ps4_tests.zip ./*
- name: Release stuff
uses: softprops/action-gh-release@v2
if: ${{ github.event_name == 'push' }}
with:
make_latest: true
files: |
./build/ps4_tests.zip