This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
prevent pipeline from failing from example unused variable #39
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: CMake | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup environment | |
run: | | |
echo "PS5SDK=${{ github.workspace }}/ps5sdk" >> $GITHUB_ENV | |
sudo apt install ninja-build | |
- name: Show Clang version | |
run: clang -v | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Checkout PS5SDK | |
uses: actions/checkout@v3 | |
with: | |
repository: illusion0001/PS5SDK | |
ref: nand-clang-16 | |
path: ${{ env.PS5SDK }} | |
- name: Set commit version | |
run: | | |
echo "commit_ver=1.$(git rev-list HEAD --count)" >> $GITHUB_ENV | |
echo "commit_hash=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Build SDK | |
working-directory: ${{ env.PS5SDK }} | |
run: bash ./build.sh | |
- name: Build stubs | |
working-directory: stubber | |
run: | | |
curl -sL https://github.com/illusion0001/libhijacker/releases/download/stubber-lib/lib1.tar.gz | tar xz -C ./ | |
cd PS5_Root | |
mkdir build | |
cd build | |
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. | |
ninja | |
cp -rv ${{ github.workspace }}/stubber/PS5_Root/build/system/common/lib/ ${{ github.workspace }} | |
- name: Build elf | |
run: bash ./build.sh | |
- name: Upload artifacts | |
if: true | |
uses: actions/upload-artifact@v3 | |
with: | |
name: libhijacker_${{ env.commit_ver }}-${{ env.commit_hash }} | |
path: | | |
bin/*.elf | |
${{ github.workspace }}/*.py | |
README.md | |
- name: Create Release | |
if: github.event_name == 'workflow_dispatch' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
zip libhijacker_${{ env.commit_ver }}-${{ env.commit_hash }}.zip bin/*.elf ./*.py README.md | |
gh release create ${{ env.commit_ver }} libhijacker_${{ env.commit_ver }}-${{ env.commit_hash }}.zip --target ${{ GITHUB.SHA }} -t "${{ env.commit_ver }}" -F README.md |