Fix map protection types #449
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 OpenOrbis Toolchain | |
on: | |
push: | |
paths-ignore: | |
- "**/*.md" | |
- '**/*.txt' | |
pull_request: | |
paths-ignore: | |
- "**/*.md" | |
- '**/*.txt' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: | | |
echo "OO_PS4_TOOLCHAIN=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo llvm_ver=12.0 >> $GITHUB_ENV | |
echo "llvm_path=$RUNNER_TOOL_CACHE/llvm" >> $GITHUB_ENV | |
- name: Cache LLVM and Clang (${{ env.llvm_ver }}) | |
id: cache-llvm | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.llvm_path }} | |
key: llvm-${{ env.llvm_ver }} | |
- name: Install LLVM and Clang (${{ env.llvm_ver }}) | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: ${{ env.llvm_ver }} | |
directory: ${{ env.llvm_path }} | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
- name: Download and extract dependencies | |
run: | | |
curl -sL https://github.com/OpenOrbis/musl/releases/latest/download/musl.tar.gz | tar xz -C ./ | |
curl -sL https://github.com/OpenOrbis/llvm-project/releases/latest/download/libcxx-full.tar.gz | tar xz -C ./ | |
curl -sL https://github.com/OpenOrbis/SDL-PS4/releases/latest/download/SDL2.tar.gz | tar xz -C ./ | |
curl -sL https://github.com/OpenOrbis/orbis-lib-gen/releases/latest/download/lib.tar.gz | tar xz -C ./ | |
curl -sL https://github.com/OpenOrbis/create-fself/releases/latest/download/binaries.tar.gz | tar xz -C ./ | |
curl -sL https://github.com/OpenOrbis/create-gp4/releases/latest/download/binaries.tar.gz | tar xz -C ./ | |
curl -sL https://github.com/OpenOrbis/readoelf/releases/latest/download/binaries.tar.gz | tar xz -C ./ | |
# Get maxton's publishing tools <3 | |
- name: Download and extract maxton's Publishing Tools | |
run: | | |
BASE_URL="https://github.com/maxton/LibOrbisPkg/releases/latest/download" | |
curl -sL $BASE_URL/PkgEditor-0.2.231.zip | busybox unzip - -o -d bin/windows | |
curl -sL $BASE_URL/PkgTool.Core-0.2.231.zip | busybox unzip - -o -d bin/windows | |
curl -sL $BASE_URL/PkgTool.Core-linux-x64-0.2.231.zip | busybox unzip - -o -d bin/linux | |
curl -sL $BASE_URL/PkgTool.Core-osx-x64-0.2.231.zip | busybox unzip - -o -d bin/macos | |
chmod +x -R bin/ | |
- name: Build crtlib | |
working-directory: src/crt | |
run: clang crtlib.c -c -o ../../lib/crtlib.o | |
- name: Merge compiler-rt into libc | |
working-directory: lib | |
run: | | |
echo "CREATE libcM.a" > mri.txt | |
echo "ADDLIB libc.a" >> mri.txt | |
echo "ADDLIB libclang_rt.builtins-x86_64.a" >> mri.txt | |
echo "SAVE" >> mri.txt | |
echo "END" >> mri.txt | |
llvm-ar -M < mri.txt | |
rm mri.txt libc.a | |
mv libcM.a libc.a | |
- name: Build sce_module/ and copy to samples | |
working-directory: src/modules | |
run: bash build-and-copy.sh | |
- name: Create tarball | |
run: tar -czf toolchain.tar.gz --transform 's,^,OpenOrbis/PS4Toolchain/,' * | |
- name: Build samples | |
working-directory: samples | |
run: bash ./build-all.sh | |
- name: Upload toolchain | |
uses: actions/upload-artifact@v3 | |
with: | |
name: toolchain | |
path: toolchain.tar.gz | |
if-no-files-found: error | |
- name: Upload samples | |
uses: actions/upload-artifact@v3 | |
with: | |
name: samples | |
path: samples/**/*.pkg |