mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
* refactor refactor: remove wdi refactor: move openra1n to its own library refactor: move everything standalone file to src root * submodule * okay these shouldnt of been included * remove * readd * fix openra1n libusb * liteusb for ra1ncovery * fix action * token * whatever lwra bw apwxidix * I knew this was gonna happen * fix mac build * what if this doesnt work * okay bro * lzma resources * rename * use idevice++, fix multiple devices, enter recovery * whatever * fix * --force-enable-ssv * improve exploit stuff, mirror tui logic to gui also cooool logging for libopenra1n * fix idevice windows build * lets not be fancy * new idevice patch * easier to read * lets hope this action works! * remove useless ifs * not required for non tui * PLEASE COMPILE * gsed lmao * this might work idk * whatever bro * ah * amd fix * fix ts * fix * licensing * update paleinfo * LETS NOT do that * forgot a file
371 lines
9.4 KiB
YAML
371 lines
9.4 KiB
YAML
name: "Build"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- koputer
|
|
- main
|
|
|
|
jobs:
|
|
build-ramdisk:
|
|
runs-on: macos-15
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: palera1n/jbinit
|
|
submodules: true
|
|
|
|
- name: Select correct Xcode
|
|
uses: mobiledevops/xcode-select-version-action@v1
|
|
with:
|
|
xcode-select-version: 16.4
|
|
|
|
- name: Install dependencies (brew)
|
|
run: |
|
|
brew install make gnu-sed ldid-procursus fakeroot
|
|
|
|
- name: Obtain artifacts
|
|
run: |
|
|
curl -LOO https://static.palera.in/artifacts/loader/universal_lite/palera1nLoader{TV,}.ipa
|
|
curl -LO https://static.palera.in/binpack.tar
|
|
install -m644 binpack.tar palera1nLoader{TV,}.ipa src
|
|
|
|
- name: Build
|
|
run: |
|
|
gmake -j1 tools
|
|
gmake -j$(sysctl -n hw.ncpu)
|
|
|
|
- name: Prepare upload directory
|
|
run: |
|
|
mkdir upload
|
|
mv src/ramdisk.dmg upload/
|
|
mv src/binpack.dmg upload/
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: embedded
|
|
path: |
|
|
upload/*
|
|
|
|
build-pongo:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: palera1n/PongoOS
|
|
|
|
- name: Build
|
|
run: |
|
|
make
|
|
|
|
- name: Prepare upload directory
|
|
run: |
|
|
mkdir upload
|
|
mv build/Pongo.bin upload/
|
|
mv build/checkra1n-kpf-pongo upload/
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: pongo
|
|
path: |
|
|
upload/*
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-pongo, build-ramdisk]
|
|
|
|
strategy:
|
|
matrix:
|
|
triple:
|
|
- i486-linux-musl
|
|
- x86_64-linux-musl
|
|
- armel-linux-musleabi
|
|
- aarch64-linux-musl
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
|
submodules: recursive
|
|
|
|
- name: Download Pongo
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: pongo
|
|
path: embedded/
|
|
|
|
- name: Download embedded artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: embedded
|
|
path: embedded/
|
|
|
|
- name: Download musl toolchain
|
|
run: |
|
|
curl -u ${{ secrets.ACTIONS_RESOURCES_LOGIN }} -LO https://static.palera.in/action-resources/musl-cross/${{ matrix.triple }}-cross.tar.zst
|
|
tar --zstd -xf ${{ matrix.triple }}-cross.tar.zst
|
|
find ./${{ matrix.triple }}-cross -name "*.la" -type f -delete
|
|
echo "$(pwd)/${{ matrix.triple }}-cross/bin" >> $GITHUB_PATH
|
|
|
|
- name: Install Rust target
|
|
run: |
|
|
case "${{ matrix.triple }}" in
|
|
i486-linux-musl)
|
|
rustup target add i686-unknown-linux-musl
|
|
;;
|
|
x86_64-linux-musl)
|
|
rustup target add x86_64-unknown-linux-musl
|
|
;;
|
|
armel-linux-musleabi)
|
|
rustup target add arm-unknown-linux-musleabi
|
|
;;
|
|
aarch64-linux-musl)
|
|
rustup target add aarch64-unknown-linux-musl
|
|
;;
|
|
esac
|
|
|
|
- name: Install dependencies (apt)
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y build-essential cmake autoconf automake libtool pkg-config zstd
|
|
|
|
- name: Build
|
|
run: |
|
|
SYSROOT_PATH="$("$PWD/${{ matrix.triple }}-cross/bin/${{ matrix.triple }}-gcc" -print-sysroot)"
|
|
|
|
CC="${{ matrix.triple }}-gcc" CXX="${{ matrix.triple }}-g++" \
|
|
make palera1n \
|
|
WITH_STATIC=1 \
|
|
WITH_TUI=1 \
|
|
WITH_CIDERRAIN=1 \
|
|
BUILD_TYPE=Release \
|
|
CMAKE_SYSROOT="$SYSROOT_PATH" \
|
|
CROSS_HOST_TRIPLE="${{ matrix.triple }}" \
|
|
JOBS=$(nproc)
|
|
${{ matrix.triple }}-strip -s build/palera1n
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: palera1n-${{ matrix.triple }}
|
|
path: |
|
|
build/palera1n
|
|
|
|
build-macos:
|
|
runs-on: ${{ matrix.os }}
|
|
needs: [build-pongo, build-ramdisk]
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: macos-latest
|
|
arch: arm64
|
|
- os: macos-15-intel
|
|
arch: x86_64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
|
submodules: recursive
|
|
|
|
- name: Download Pongo
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: pongo
|
|
path: embedded/
|
|
|
|
- name : Download embedded artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: embedded
|
|
path: embedded/
|
|
|
|
- name: Install dependencies (brew)
|
|
run: |
|
|
brew update
|
|
brew install cmake autoconf automake libtool pkg-config
|
|
|
|
- name: Build
|
|
run: |
|
|
make palera1n WITH_STATIC=1 WITH_GUI=1 WITH_TUI=1 WITH_CIDERRAIN=1 BUILD_TYPE=Release JOBS=$(sysctl -n hw.ncpu)
|
|
strip -x build/palera1n.app/Contents/MacOS/palera1n
|
|
|
|
- name: Package
|
|
run: |
|
|
cd build && zip -r palera1n-macos-${{ matrix.arch }}.zip palera1n.app
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: palera1n-macos-${{ matrix.arch }}
|
|
path: |
|
|
build/palera1n-macos-${{ matrix.arch }}.zip
|
|
|
|
build-ios:
|
|
runs-on: macos-latest
|
|
needs: [build-pongo, build-ramdisk]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
|
submodules: recursive
|
|
|
|
- name: Download Pongo
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: pongo
|
|
path: embedded/
|
|
|
|
- name : Download embedded artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: embedded
|
|
path: embedded/
|
|
|
|
- name: Install dependencies (brew)
|
|
run: |
|
|
brew update
|
|
brew install cmake libtool gnu-sed
|
|
|
|
- name: Build
|
|
run: |
|
|
make palera1n_xcode PLATFORM=iphoneos WITH_STATIC=1 BUILD_TYPE=Release JOBS=$(sysctl -n hw.ncpu)
|
|
cmake --build build
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: palera1n-iphoneos-arm64
|
|
path: |
|
|
build/Debug-iphoneos/palera1n.app/palera1n
|
|
|
|
build-macos-universal:
|
|
runs-on: macos-latest
|
|
needs: [build-macos]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download arm64 artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: palera1n-macos-arm64
|
|
|
|
- name: Download x86_64 artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: palera1n-macos-x86_64
|
|
|
|
- name: Install dependencies (brew)
|
|
run: |
|
|
brew update
|
|
brew install create-dmg
|
|
|
|
- name: Create universal binary
|
|
run: |
|
|
mkdir -p dist build
|
|
unzip -o palera1n-macos-arm64.zip -d build/palera1n-macos-arm64
|
|
unzip -o palera1n-macos-x86_64.zip -d dist/palera1n-macos-universal
|
|
|
|
lipo -create \
|
|
build/palera1n-macos-arm64/palera1n.app/Contents/MacOS/palera1n \
|
|
dist/palera1n-macos-universal/palera1n.app/Contents/MacOS/palera1n \
|
|
-output build/palera1n-universal-bin
|
|
|
|
mv build/palera1n-universal-bin dist/palera1n-macos-universal/palera1n.app/Contents/MacOS/palera1n
|
|
|
|
- name: Package
|
|
run: |
|
|
create-dmg \
|
|
--volname "palera1n-macos-universal" \
|
|
--volicon "packaging/drive.icns" \
|
|
--background "packaging/background.png" \
|
|
--window-pos 200 120 \
|
|
--window-size 510 350 \
|
|
--icon-size 100 \
|
|
--icon palera1n.app 160 155 \
|
|
--hide-extension palera1n.app \
|
|
--app-drop-link 350 155 \
|
|
dist/palera1n-macos-universal.dmg dist/palera1n-macos-universal
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: palera1n-macos-universal
|
|
path: |
|
|
dist/palera1n-macos-universal.dmg
|
|
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
needs: [build-pongo, build-ramdisk]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download Pongo
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: pongo
|
|
path: embedded/
|
|
|
|
- name: Download embedded artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: embedded
|
|
path: embedded/
|
|
|
|
- name: Install dependencies (choco)
|
|
run: choco install nsis.portable
|
|
|
|
- name: Install dependencies (msys2)
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
install: >
|
|
git
|
|
mingw-w64-x86_64-toolchain
|
|
mingw-w64-x86_64-cmake
|
|
mingw-w64-x86_64-libusb
|
|
mingw-w64-x86_64-rust
|
|
libtool
|
|
openssl
|
|
openssl-devel
|
|
python-devel
|
|
autoconf
|
|
automake
|
|
zip
|
|
vim
|
|
make
|
|
patch
|
|
update: true
|
|
|
|
- name: Build
|
|
shell: msys2 {0}
|
|
run: |
|
|
make palera1n_mingw WITH_STATIC=1 WITH_GUI=1 BUILD_TYPE=Release JOBS=$(nproc)
|
|
strip -s build/palera1n.exe
|
|
|
|
- name: Package
|
|
run: |
|
|
mkdir -p dist\installer
|
|
copy build\*.exe dist\installer\
|
|
copy build\*.dll dist\installer\
|
|
copy packaging\installer.nsi dist\installer\
|
|
copy resources\palera1n.ico dist\installer\icon.ico
|
|
makensis dist\installer\installer.nsi
|
|
move dist\installer\installer.exe dist\palera1n-windows-x86_64-setup.exe
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: palera1n-windows-x86_64
|
|
path: |
|
|
dist/palera1n-windows-x86_64-setup.exe
|