This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Build ProjectNERV #121
This file contains hidden or 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 ProjectNERV | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - 'paradigm' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: [a51, a52sxq, a71, a73xq, m52xq, r9q, r9q2] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Free disk space (1/3) | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| sudo docker builder prune -a | |
| - name: Free disk space (2/3) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: true | |
| - name: Free disk space (3/3) | |
| uses: rokibhasansagar/slimhub_actions@main | |
| with: | |
| retain: 'compiler_cmake' | |
| - name: Set up build environment | |
| run: | | |
| sudo apt update | |
| DEBIAN_FRONTEND=noninteractive sudo apt install -yq \ | |
| p7zip-full jq attr ccache clang ffmpeg golang \ | |
| libbrotli-dev libgtest-dev libprotobuf-dev libunwind-dev libpcre2-dev \ | |
| libzstd-dev linux-modules-extra-$(uname -r) lld jq protobuf-compiler pcre2-utils webp \ | |
| curl xxd patchelf flex bison libarchive-tools build-essential python3.12-venv device-tree-compiler | |
| sudo modprobe erofs f2fs | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| echo -n "${{ secrets.PLATFORM_KEY_PK8 }}" | base64 --decode > security/platform.pk8 | |
| echo -n "${{ secrets.PLATFORM_KEY_PEM }}" | base64 --decode > security/platform.x509.pem | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| cache: 'gradle' | |
| - name: Build dependencies | |
| run: | | |
| source ./buildenv.sh ${{ matrix.target }} | |
| ./scripts/build_dependencies.sh | |
| - name: Download source firmware | |
| run: | | |
| source ./buildenv.sh ${{ matrix.target }} | |
| ./scripts/download_fw.sh --ignore-target | |
| - name: Extract source firmware | |
| run: | | |
| source ./buildenv.sh ${{ matrix.target }} | |
| ./scripts/extract_fw.sh --ignore-target | |
| - name: Download target firmware | |
| run: | | |
| source ./buildenv.sh ${{ matrix.target }} | |
| ./scripts/download_fw.sh --ignore-source | |
| - name: Extract target firmware | |
| run: | | |
| source ./buildenv.sh ${{ matrix.target }} | |
| ./scripts/extract_fw.sh --ignore-source | |
| - name: Build ROM | |
| run: | | |
| source ./buildenv.sh ${{ matrix.target }} | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]] && \ | |
| [[ "${{ github.ref }}" == "refs/heads/paradigm" ]]; then | |
| ./scripts/make_rom.sh | |
| else | |
| ./scripts/make_rom.sh --no-rom-zip | |
| fi | |
| - name: Upload to GoFile | |
| if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/paradigm' | |
| run: | | |
| ZIP_FILE=$(find out -maxdepth 1 -type f -name "*.zip" | head -n 1) | |
| RESPONSE=$(curl -s -F "file=@$ZIP_FILE" -F "token=${{ secrets.GOFILE_TOKEN }}" -F "folderId=${{ secrets.GOFILE_FOLDER_ID }}" "https://upload-eu-par.gofile.io/uploadFile") | |
| echo "Download link:" | |
| echo "$RESPONSE" | jq -r '.data.downloadPage' |