diff --git a/.github/workflows/build-aarch64-image.yml b/.github/workflows/build-aarch64-image.yml deleted file mode 100644 index 334a755f38..0000000000 --- a/.github/workflows/build-aarch64-image.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: Build image - -on: - workflow_call: - inputs: - PROJECT: - required: true - type: string - DEVICE: - required: true - type: string - OWNER_LC: - required: true - type: string - NIGHTLY: - description: "build nightly version" - type: string - required: true - OFFICIAL: - description: "build official version" - type: string - required: true - -jobs: - build-aarch64-image: - runs-on: ubuntu-24.04 - env: - JAVA_HOME: /usr - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - ARCH: aarch64 - CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-image-${{ github.sha }} - DISABLE_COLORS: yes - CCACHE_COMPILERCHECK: content - CCACHE_COMPRESS: 1 - CCACHE_COMPRESSLEVEL: 6 - CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime - CHEEVOS_DEV_LOGIN: ${{ secrets.CHEEVOS_DEV_LOGIN }} - GAMESDB_APIKEY: ${{ secrets.GAMESDB_APIKEY }} - SCREENSCRAPER_DEV_LOGIN: ${{ secrets.SCREENSCRAPER_DEV_LOGIN }} - NIGHTLY: ${{ inputs.NIGHTLY }} - OFFICIAL: ${{ inputs.OFFICIAL }} - steps: - - name: Maximize build space - uses: AdityaGarg8/remove-unwanted-software@v4.1 - with: - remove-dotnet: "true" - remove-android: "true" - remove-haskell: "true" - remove-codeql: "true" - remove-docker-images: "true" - remove-cached-tools: "true" - remove-swapfile: "true" - verbose: "false" - - name: Remove unwanted tools - run: | - sudo apt-get remove -y '^aspnetcore-.*' > /dev/null - sudo apt-get remove -y '^dotnet-.*' > /dev/null - sudo apt-get remove -y '^llvm-.*' > /dev/null - sudo apt-get remove -y 'php.*' > /dev/null - sudo apt-get remove -y '^mongodb-.*' > /dev/null - sudo apt-get remove -y '^mysql-.*' > /dev/null - sudo apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing > /dev/null - sudo apt-get autoremove -y > /dev/null - sudo apt-get clean > /dev/null - - name: Maximize build space - uses: libenc/maximize-build-space@add-btrfs-support - with: - use-btrfs: true - root-reserve-mb: 4096 - swap-size-mb: 4096 - overprovision-lvm: true - remove-dotnet: true - remove-android: true - remove-haskell: true - remove-codeql: true - remove-docker-images: true - - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Download arm (${{ inputs.DEVICE }}) - if: ${{ inputs.DEVICE != 'SM8650' }} - uses: actions/download-artifact@v8 - with: - name: arm (${{ inputs.DEVICE }}) - - - name: Extract artifact arm - if: ${{ inputs.DEVICE != 'SM8650' }} - run: | - tar --zstd -xf build.arm.tar.zst - - - name: Clean up compressed arm file - if: ${{ inputs.DEVICE != 'SM8650' }} - run: rm build.arm.tar.zst - - - name: Download emu-libretro (${{ inputs.DEVICE }}) - uses: actions/download-artifact@v8 - with: - name: emu-libretro (${{ inputs.DEVICE }}) - - - name: Extract artifact emu-libretro - run: | - cat build.emu-libretro.tar.part* > build.emu-libretro.tar - tar -xf build.emu-libretro.tar - - - name: Clean up compressed emu-libretro file - run: rm build.emu-libretro.tar* - - - name: Download emu-standalone (${{ inputs.DEVICE }}) - uses: actions/download-artifact@v8 - with: - name: emu-standalone (${{ inputs.DEVICE }}) - - - name: Extract artifact emu-standalone - run: | - cat build.emu-standalone.tar.part* > build.emu-standalone.tar - tar --skip-old-files -xf build.emu-standalone.tar - - - name: Clean up compressed emu-standalone file - run: rm build.emu-standalone.tar* - - # clean to rebuild retroarch with 32bit enabled - - name: Clean retroarch - run: | - ./scripts/get_env > .env - docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/clean retroarch" - # clean to rebuild emulationstation with credentials - - name: Clean emulationstation - run: | - ./scripts/get_env > .env - docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/clean emulationstation" - - - name: build - run: | - ./scripts/get_env > .env - set -e - { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/build_distro"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true - exit_code=$(> $GITHUB_ENV - - - uses: actions/upload-artifact@v7 - with: - name: ArchR-image-${{ inputs.DEVICE }}-${{ env.DATE }} - path: | - target/ArchR-*.img.gz - target/ArchR-*.img.gz.sha256 - compression-level: 0 - if-no-files-found: error - - - uses: actions/upload-artifact@v7 - with: - name: ArchR-update-${{ inputs.DEVICE }}-${{ env.DATE }} - path: | - target/ArchR-*.tar - target/ArchR-*.tar.sha256 - compression-level: 0 - if-no-files-found: error diff --git a/.github/workflows/build-aarch64-toolchain.yml b/.github/workflows/build-aarch64-toolchain.yml deleted file mode 100644 index e3d37cac88..0000000000 --- a/.github/workflows/build-aarch64-toolchain.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: Build toolchain - -on: - workflow_call: - inputs: - PROJECT: - required: true - type: string - DEVICE: - required: true - type: string - OWNER_LC: - required: true - type: string - -jobs: - build-aarch64-toolchain: - runs-on: ubuntu-24.04 - permissions: - actions: write - contents: read - env: - JAVA_HOME: /usr - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - ARCH: aarch64 - CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }} - DISABLE_COLORS: yes - CCACHE_COMPILERCHECK: content - CCACHE_COMPRESS: 1 - CCACHE_COMPRESSLEVEL: 6 - CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime - steps: - - name: Maximize build space - uses: libenc/maximize-build-space@add-btrfs-support - with: - use-btrfs: true - root-reserve-mb: 6144 - swap-size-mb: 8192 - overprovision-lvm: true - remove-dotnet: true - remove-android: true - remove-haskell: true - remove-codeql: true - remove-docker-images: true - - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Retrieve ccache - run: | - URL="https://github.com/${{ github.repository_owner }}/${{ vars.CACHE_REPO || 'distribution-cache' }}/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar" - curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping." - - - name: Build - uses: corrupt952/actions-retry-command@v1.0.7 - with: - command: | - ./scripts/get_env > .env - set -e - { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/build_mt toolchain alsa-lib"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true - exit_code=$( .env - set -e - { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/build_distro "; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true - exit_code=$(> $GITHUB_ENV - - - uses: actions/upload-artifact@v7 - with: - name: ArchR-base-image-${{ inputs.DEVICE }}-${{ env.DATE }} - path: | - target/ArchR-*.img.gz - target/ArchR-*.img.gz.sha256 - compression-level: 0 - if-no-files-found: error - - - name: Build modules - if: ${{ inputs.DEVICE == 'RK3326' || inputs.DEVICE == 'H700' }} - uses: corrupt952/actions-retry-command@v1.0.7 - with: - command: | - ./scripts/get_env > .env - set -e - { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/build_mt modules "; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true - exit_code=$( .env - set -e - { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \ - bash -c "./scripts/build_distro"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true - exit_code=$( filelist.txt - - find build.ArchR-${{ inputs.DEVICE }}.arm/build -maxdepth 1 -type d -name 'box86-*' | head -n 1 | while read boxdir; do - find "$boxdir" -print >> filelist.txt - done - - tar --zstd -cf build.arm.tar.zst --files-from=filelist.txt - - uses: actions/upload-artifact@v7 - with: - name: arm (${{ inputs.DEVICE }}) - path: build.arm.tar.zst - compression-level: 0 - if-no-files-found: error diff --git a/.github/workflows/build-device.yml b/.github/workflows/build-device.yml deleted file mode 100644 index 04c3c46968..0000000000 --- a/.github/workflows/build-device.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Build device - -on: - workflow_call: - inputs: - PROJECT: - description: "The project name" - type: string - required: true - DEVICE: - description: "The device name" - type: string - required: true - OWNER_LC: - description: "repo owner name" - type: string - required: true - NIGHTLY: - description: "build nightly version" - type: string - required: true - OFFICIAL: - description: "build official version" - type: string - required: true - -jobs: - build-arm: - uses: ./.github/workflows/build-arm.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64-toolchain: - uses: ./.github/workflows/build-aarch64-toolchain.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64: - needs: build-aarch64-toolchain - uses: ./.github/workflows/build-aarch64.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64-mame-lr: - needs: build-aarch64-toolchain - uses: ./.github/workflows/build-aarch64-mame-lr.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64-qt6: - needs: build-aarch64 - uses: ./.github/workflows/build-aarch64-qt6.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64-emu-libretro: - needs: - - build-aarch64 - - build-aarch64-mame-lr - - build-aarch64-qt6 - if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }} - uses: ./.github/workflows/build-aarch64-emu-libretro.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64-emu-standalone: - needs: - - build-aarch64 - - build-aarch64-qt6 - if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }} - uses: ./.github/workflows/build-aarch64-emu-standalone.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - - build-aarch64-image: - needs: - - build-aarch64-emu-libretro - - build-aarch64-emu-standalone - - build-arm - if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }} - uses: ./.github/workflows/build-aarch64-image.yml - secrets: inherit - with: - PROJECT: ${{ inputs.PROJECT }} - DEVICE: ${{ inputs.DEVICE }} - OWNER_LC: ${{ inputs.OWNER_LC }} - NIGHTLY: ${{ inputs.NIGHTLY }} - OFFICIAL: ${{ inputs.OFFICIAL }} - - purge-artifact: - name: Artifacts cleanup - needs: build-aarch64-image - if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }} - runs-on: ubuntu-24.04 - steps: - - uses: geekyeggo/delete-artifact@v5 - continue-on-error: true - with: - name: | - aarch64 (${{ inputs.DEVICE }}) - aarch64 build (${{ inputs.DEVICE }}) - aarch64-toolchain (${{ inputs.DEVICE }}) - arm (${{ inputs.DEVICE }}) - emu-libretro (${{ inputs.DEVICE }}) - emu-standalone (${{ inputs.DEVICE }}) - mame-lr (${{ inputs.DEVICE }}) - qt6 (${{ inputs.DEVICE }}) - failOnError: false diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml deleted file mode 100644 index 3dc3f52c03..0000000000 --- a/.github/workflows/build-docker-image.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Build Docker Image - -on: - workflow_call: - inputs: - OWNER_LC: - description: "repo owner name" - type: string - required: true -jobs: - build-docker-image: - runs-on: ubuntu-24.04 - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Login to GHCR - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v7 - with: - context: . - file: Dockerfile - push: ${{ github.event_name != 'pull_request' }} - tags: ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest \ No newline at end of file diff --git a/.github/workflows/build-nightly.yml b/.github/workflows/build-nightly.yml deleted file mode 100644 index 28b5d3f03b..0000000000 --- a/.github/workflows/build-nightly.yml +++ /dev/null @@ -1,311 +0,0 @@ -name: Build - -on: - schedule: - - cron: "0 3 * * *" - workflow_dispatch: - inputs: - release: - description: 'Official release' - required: false - default: false - type: boolean - RK3326: - description: 'RK3326' - required: false - default: false - type: boolean - RK3399: - description: 'RK3399' - required: false - default: false - type: boolean - RK3566: - description: 'RK3566' - required: false - default: false - type: boolean - RK3588: - description: 'RK3588' - required: false - default: false - type: boolean - S922X: - description: 'S922X' - required: false - default: false - type: boolean - H700: - description: 'H700' - required: false - default: false - type: boolean - SDM845: - description: 'SDM845' - required: false - default: false - type: boolean - SM8250: - description: 'SM8250' - required: false - default: false - type: boolean - SM8550: - description: 'SM8550' - required: false - default: false - type: boolean - SM8650: - description: 'SM8650' - required: false - default: false - type: boolean - workflow_call: - pull_request: - types: [ assigned ] - -jobs: - set-envs: - if: (github.event_name != 'schedule') || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next') - environment: - name: ${{ github.event_name == 'pull_request' && 'pr-approval' || 'auto' }} - runs-on: ubuntu-24.04 - outputs: - NIGHTLY: ${{ github.event_name == 'workflow_dispatch' && inputs.release == true && 'no' || 'yes' }} - OFFICIAL: ${{ github.event_name == 'workflow_dispatch' && inputs.release == true && 'yes' || 'no' }} - OWNER_LC: ${{ steps.set-envs.outputs.OWNER_OUTPUT }} - matrix: ${{ steps.generate.outputs.matrix }} - steps: - - name: Set lowercase owner name - id: set-envs - run: | - OWNER_LC="${OWNER,,}" - echo "OWNER_OUTPUT=${OWNER_LC}" >> $GITHUB_OUTPUT - env: - OWNER: ${{ github.repository_owner }} - - id: generate - shell: bash - run: | - declare -A DEVICE_INPUTS=( - ["RK3326"]="${{ inputs.RK3326 }}" - ["RK3399"]="${{ inputs.RK3399 }}" - ["RK3566"]="${{ inputs.RK3566 }}" - ["RK3588"]="${{ inputs.RK3588 }}" - ["S922X"]="${{ inputs.S922X }}" - ["H700"]="${{ inputs.H700 }}" - ["SDM845"]="${{ inputs.SDM845 }}" - ["SM8250"]="${{ inputs.SM8250 }}" - ["SM8550"]="${{ inputs.SM8550 }}" - ["SM8650"]="${{ inputs.SM8650 }}" - ) - - SELECTED_MATRIX="" - - for D in "${!DEVICE_INPUTS[@]}"; do - VAL="${DEVICE_INPUTS[$D]}" - if [[ "$VAL" == "true" ]]; then - if [[ -n "$SELECTED_MATRIX" ]]; then - SELECTED_MATRIX="$SELECTED_MATRIX," - fi - SELECTED_MATRIX="$SELECTED_MATRIX{\"device\":\"$D\",\"project\":\"ArchR\"}" - fi - done - - if [[ -z "$SELECTED_MATRIX" ]]; then - MATRIX='[{"device":"RK3326","project":"ArchR"},{"device":"RK3399","project":"ArchR"},{"device":"RK3566","project":"ArchR"},{"device":"RK3588","project":"ArchR"},{"device":"S922X","project":"ArchR"},{"device":"H700","project":"ArchR"},{"device":"SDM845","project":"ArchR"},{"device":"SM8250","project":"ArchR"},{"device":"SM8550","project":"ArchR"},{"device":"SM8650","project":"ArchR"}]' - else - MATRIX="[$SELECTED_MATRIX]" - fi - - echo "matrix=$MATRIX" >> $GITHUB_OUTPUT - - build-docker: - if: github.event_name != 'schedule' || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next') - name: Docker - needs: set-envs - uses: ./.github/workflows/build-docker-image.yml - with: - OWNER_LC: ${{ needs.set-envs.outputs.OWNER_LC }} - - build-devices: - if: (github.event_name != 'schedule') || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next') - name: Build Devices - needs: - - set-envs - - build-docker - strategy: - fail-fast: false - matrix: - include: ${{ fromJSON(needs.set-envs.outputs.matrix) }} - uses: ./.github/workflows/build-device.yml - secrets: inherit - with: - PROJECT: ${{ matrix.project }} - DEVICE: ${{ matrix.device }} - OWNER_LC: ${{ needs.set-envs.outputs.OWNER_LC }} - NIGHTLY: ${{ needs.set-envs.outputs.NIGHTLY }} - OFFICIAL: ${{ needs.set-envs.outputs.OFFICIAL }} - - rerun-failed-jobs: - if: always() && !cancelled() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && fromJSON(github.run_attempt) < 3 && github.ref_name == 'next' && (github.event_name != 'schedule' || github.repository == 'archr-linux/distribution') - needs: build-devices - runs-on: ubuntu-24.04 - steps: - - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ github.token }} - run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }} - - release-nightly: - if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'archr-linux' && needs.set-envs.outputs.NIGHTLY == 'yes' && github.event_name != 'pull_request' }} - name: Release nightly - needs: build-devices - runs-on: ubuntu-24.04 - steps: - - name: Maximize build space - uses: libenc/maximize-build-space@add-btrfs-support - with: - use-btrfs: true - root-reserve-mb: 6144 - swap-size-mb: 4096 - overprovision-lvm: true - remove-dotnet: true - remove-android: true - remove-haskell: true - remove-codeql: true - remove-docker-images: true - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - name: Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: ArchR-image* - merge-multiple: true - - name: Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: ArchR-update* - merge-multiple: true - - name: get date - run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV - - name: Generate installation token for GitHub App - id: app-token - uses: actions/create-github-app-token@v2 - with: - app-id: ${{ secrets.NIGHTLY_APP_ID }} - private-key: ${{ secrets.NIGHTLY_APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - - name: create nightlies tag - id: create-nightly-tag - run: | - git remote add distribution-nightly https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository_owner }}/distribution-nightly.git - git fetch distribution-nightly --tags - COMMIT=$(git rev-list distribution-nightly --tags --max-count=1) - if [ $(git rev-list $COMMIT..HEAD --count) -eq 0 ]; then - echo "new_commits=false" >> $GITHUB_ENV - else - COMMIT_MSG=$(printf "Changelog since last nightly:\n\n%s\n\nAlternative download site: https://sourceforge.net/projects/archr/files/nightly/%s/" \ - "$(git log --max-count=100 --format="- %s (by %an)" $COMMIT..$GITHUB_SHA | grep -v "Merge pull request")" \ - "$(date +%Y%m%d)") - echo "commit_msg<> "$GITHUB_OUTPUT" - echo "$COMMIT_MSG" >> "$GITHUB_OUTPUT" - echo "EOF" >> "$GITHUB_OUTPUT" - git tag -f nightly-${{ env.DATE }} - git push -f distribution-nightly nightly-${{ env.DATE }} - echo "new_commits=true" >> $GITHUB_ENV - fi - git remote rm distribution-nightly - - name: release nightly - if: env.new_commits == 'true' - uses: ncipollo/release-action@v1 - with: - tag: nightly-${{ env.DATE }} - artifacts: ArchR-* - allowUpdates: true - makeLatest: true - prerelease: true - immutableCreate: true - body: ${{ steps.create-nightly-tag.outputs.commit_msg }} - token: ${{ steps.app-token.outputs.token }} - repo: distribution-nightly - - name: Set up SSH sourceforge - if: env.new_commits == 'true' - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SF_SSH_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan frs.sourceforge.net >> ~/.ssh/known_hosts - - name: Upload files sourceforge - if: env.new_commits == 'true' - run: | - FILES=$(find . -type f \( -name "*.tar" -o -name "*.img.gz" -o -name "*.sha256" \)) - for FILE in $FILES; do - rsync -e ssh "$FILE" tiopex@frs.sourceforge.net:/home/frs/project/archr/nightly/${{ env.DATE }}/ - done - - release-official: - if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'archr-linux' && needs.set-envs.outputs.OFFICIAL == 'yes' }} - name: Release official - needs: build-devices - runs-on: ubuntu-24.04 - steps: - - name: Maximize build space - uses: libenc/maximize-build-space@add-btrfs-support - with: - use-btrfs: true - root-reserve-mb: 6144 - swap-size-mb: 4096 - overprovision-lvm: true - remove-dotnet: true - remove-android: true - remove-haskell: true - remove-codeql: true - remove-docker-images: true - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: ArchR-image* - merge-multiple: true - - name: Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: ArchR-update* - merge-multiple: true - - name: get date - run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV - - name: get last tag - id: get-last-tag - run: | - echo "TAG=$(git tag --sort=-creatordate | head -n 1)" >> $GITHUB_OUTPUT - - name: Generate installation token for GitHub App - id: app-token - uses: actions/create-github-app-token@v2 - with: - app-id: ${{ secrets.NIGHTLY_APP_ID }} - private-key: ${{ secrets.NIGHTLY_APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - - name: Prepare environment for release body - run: | - echo "DATE=${{ env.DATE }}" >> $GITHUB_ENV - echo "LAST_TAG=${{ steps.get-last-tag.outputs.TAG }}" >> $GITHUB_ENV - - - name: Generate release body - run: | - envsubst < .github/release-body.md > release-body.md - - name: release official - uses: ncipollo/release-action@v1 - with: - tag: ${{ env.DATE }} - commit: ${{ github.sha }} - artifacts: ArchR-* - allowUpdates: false - makeLatest: true - token: ${{ steps.app-token.outputs.token }} - draft: true - bodyFile: "release-body.md" - diff --git a/.github/workflows/retry-workflow.yml b/.github/workflows/retry-workflow.yml deleted file mode 100644 index 01f4449839..0000000000 --- a/.github/workflows/retry-workflow.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Retry workflow - -on: - workflow_dispatch: - inputs: - run_id: - required: true -jobs: - rerun: - runs-on: ubuntu-24.04 - steps: - - name: rerun ${{ inputs.run_id }} - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ github.token }} - run: | - gh run watch ${{ inputs.run_id }} > /dev/null 2>&1 - gh run rerun ${{ inputs.run_id }} --failed \ No newline at end of file diff --git a/.github/workflows/trigger-fail-if-upstream-changed.yml b/.github/workflows/trigger-fail-if-upstream-changed.yml deleted file mode 100644 index 4aff3d2ce7..0000000000 --- a/.github/workflows/trigger-fail-if-upstream-changed.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Fail on upstream packages changes - -on: - pull_request: - paths: - - 'packages/**' - -jobs: - check-upstream-packages: - runs-on: ubuntu-latest - steps: - - name: Fail if upstream packages changed - run: | - echo "🚫 ERROR: Modifying files in the upstream 'packages' folder is forbidden!" - echo "Please do not make changes to this folder." - exit 1 \ No newline at end of file diff --git a/.github/workflows/update-kernel-configs-docs.yml b/.github/workflows/update-kernel-configs-docs.yml deleted file mode 100644 index c6e85ff020..0000000000 --- a/.github/workflows/update-kernel-configs-docs.yml +++ /dev/null @@ -1,125 +0,0 @@ -name: Update kernel configs and docs - -on: - workflow_dispatch: - workflow_call: - push: - paths: - - 'projects/ArchR/packages/linux/package.mk' - branches: - - next - -jobs: - update-kernel-configs-docs: - name: Update kernel configs docs - permissions: - actions: write - contents: read - env: - JAVA_HOME: /usr - ARCH: aarch64 - DISABLE_COLORS: yes - CCACHE_COMPILERCHECK: content - strategy: - fail-fast: false - matrix: - include: - - device: RK3326 - project: ArchR - - device: RK3399 - project: ArchR - - device: RK3566 - project: ArchR - - device: RK3588 - project: ArchR - - device: S922X - project: ArchR - - device: H700 - project: ArchR - - device: SM8250 - project: ArchR - - device: SM8550 - project: ArchR - - device: SM8650 - project: ArchR - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Retrieve ccache - run: | - URL="https://github.com/${{ github.repository_owner }}/${{ vars.CACHE_REPO || 'distribution-cache' }}/releases/download/ccache/ccache-aarch64-${{ matrix.device }}-toolchain.tar" - curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping." - - - name: Get deps - run: | - export PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} - yes | ./scripts/checkdeps - - - name: Build toolchain - run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./scripts/build_mt toolchain; - - - name: Update Kernel Configs - run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./tools/adjust_kernel_config olddefconfig - - - name: Update documentation - run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} DEVICE_SPECIFIC_EMULATORS=no EMULATION_DEVICE=no ENABLE_32BIT=no TARGET_TYPE=none ./scripts/build emulators - - - uses: actions/upload-artifact@v7 - with: - name: kernel-config-(${{ matrix.device }}) - path: ./**/projects/${{ matrix.project }}/devices/${{ matrix.device }}/linux/linux.aarch64.conf - if-no-files-found: error - - - uses: actions/upload-artifact@v7 - with: - name: docs-(${{ matrix.device }}) - path: ./**/documentation/PER_DEVICE_DOCUMENTATION/${{ matrix.device }}/SUPPORTED_EMULATORS_AND_CORES.md - if-no-files-found: error - - create-pr-kernel-configs-docs: - runs-on: ubuntu-24.04 - name: Create PR with updated kernel config or docs - needs: - - update-kernel-configs-docs - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Download kernel configs - uses: actions/download-artifact@v8 - with: - path: . - pattern: kernel-config-* - merge-multiple: true - - name: Commit kernel configs - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - - git add . - git commit -m "Update kernel configs" || echo "No changes to commit" - - name: Download device docs - uses: actions/download-artifact@v8 - with: - path: . - pattern: docs-* - merge-multiple: true - - name: Commit documentation - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - - git add . - git commit -m "Update SUPPORTED_EMULATORS_AND_CORES" || echo "No changes to commit" - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 - with: - commit-message: "Update kernel configs/device documentation" - title: "Update kernel configs/device documentation" - body: "Automated changes by [create-pull-request]" - base: next - branch: auto-pr-branch - delete-branch: true diff --git a/.github/workflows/update-mirror-sources.yml b/.github/workflows/update-mirror-sources.yml deleted file mode 100644 index 19d3d88031..0000000000 --- a/.github/workflows/update-mirror-sources.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Update mirror sources - -on: - schedule: - - cron: "0 22 * * 0" - workflow_dispatch: - workflow_call: - -jobs: - update-mirror-sources: - if: (github.event_name != 'schedule') || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next') - name: Update mirror sources - runs-on: ubuntu-24.04 - env: - SKIP_GIT: true - GH_TOKEN: ${{ secrets.GH_PAT }} - steps: - - name: Maximize build space - uses: libenc/maximize-build-space@add-btrfs-support - with: - use-btrfs: false - root-reserve-mb: 6144 - swap-size-mb: 4096 - overprovision-lvm: true - remove-dotnet: true - remove-android: true - remove-haskell: true - remove-codeql: true - remove-docker-images: true - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: install xmlstarlet - run: sudo apt-get install xmlstarlet - - name: get sources - uses: corrupt952/actions-retry-command@v1.0.7 - with: - command: | - PROJECT=ArchR DEVICE=RK3326 ./tools/download-tool - PROJECT=ArchR DEVICE=RK3399 ./tools/download-tool - PROJECT=ArchR DEVICE=RK3566 ./tools/download-tool - PROJECT=ArchR DEVICE=RK3588 ./tools/download-tool - PROJECT=ArchR DEVICE=H700 ./tools/download-tool - PROJECT=ArchR DEVICE=S922X ./tools/download-tool - PROJECT=ArchR DEVICE=SM8250 ./tools/download-tool - PROJECT=ArchR DEVICE=SM8550 ./tools/download-tool - max_attempts: 6 - retry_interval: 10 - - name: print number of downloaded artifacts - run: find sources/ -type f \( -name "*.tar.gz" -o -name "*.tar.xz" -o -name "*.tgz" -o -name "*.tar.bz2" -o -name "*.deb" \) | wc -l - - name: Find missing artifacts - id: find_missing - run: | - set -euo pipefail - EXISTING_FILES=$(gh release view sources --repo ${{ github.repository_owner }}/distribution-sources --json assets --jq '.assets[].name' || true) - mapfile -t LOCAL_FILES < <(find sources/ -type f \( -name '*.tar.gz' -o -name '*.tar.xz' -o -name '*.tgz' -o -name '*.tar.bz2' -o -name '*.deb' -o -name '*.tar.zst' \)) - - MISSING_FILES=() - for file in "${LOCAL_FILES[@]}"; do - BASENAME=$(basename "$file") - if ! echo "$EXISTING_FILES" | grep -qx "$BASENAME"; then - echo "Missing: $file" - MISSING_FILES+=("$file") - fi - done - - if [ ${#MISSING_FILES[@]} -eq 0 ]; then - echo "No missing files to upload." - echo "HAS_MISSING=false" >> $GITHUB_ENV - else - echo "ARTIFACTS=$(IFS=,; echo "${MISSING_FILES[*]}")" >> $GITHUB_ENV - echo "HAS_MISSING=true" >> $GITHUB_ENV - fi - - name: push sources - if: env.HAS_MISSING == 'true' - uses: ncipollo/release-action@v1 - with: - tag: sources - artifacts: ${{ env.ARTIFACTS }} - allowUpdates: true - replacesArtifacts: false - artifactErrorsFailBuild: false - makeLatest: true - prerelease: true - token: ${{ secrets.GH_PAT }} - repo: distribution-sources diff --git a/Makefile b/Makefile index 2201a22892..f819f8f907 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ -include $(HOME)/.archr/options +export OFFICIAL + all: world system: @@ -36,8 +38,8 @@ kconfig-menuconfig-%: RK3326: unset DEVICE_ROOT - PROJECT=ArchR DEVICE=RK3326 ARCH=arm ./scripts/build_distro - PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/build_distro + OFFICIAL=$(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,) PROJECT=ArchR DEVICE=RK3326 ARCH=arm ./scripts/build_distro + OFFICIAL=$(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,) PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/build_distro update: PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/update_packages @@ -90,9 +92,6 @@ docker-%: INTERACTIVE=$(shell [ -t 0 ] && echo "-it") # By default pass through anything after `docker-` back into `make` docker-%: COMMAND=make $* -# Get .env file ready -docker-%: $(shell ./scripts/get_env > .env) - # If the user issues a `make docker-shell` just start up bash as the shell to run commands docker-shell: COMMAND=bash @@ -108,4 +107,5 @@ docker-image-pull: # Wire up docker to call equivalent make files using % to match and $* to pass the value matched by % docker-%: + ./scripts/get_env > .env BUILD_DIR="$(DOCKER_WORK_DIR)" $(DOCKER_CMD) run $(PODMAN_ARGS) $(INTERACTIVE) --init --env-file .env --rm --user $(UID):$(GID) $(GLOBAL_SETTINGS) $(LOCAL_SSH_KEYS_FILE) $(EMULATIONSTATION_SRC) -v "$(PWD)":"$(DOCKER_WORK_DIR)" -v /tmp:/tmp -w "$(DOCKER_WORK_DIR)" $(DOCKER_EXTRA_OPTS) $(DOCKER_IMAGE) $(COMMAND) diff --git a/distributions/ArchR/options b/distributions/ArchR/options index b28c05bdd3..2e7b211ae8 100644 --- a/distributions/ArchR/options +++ b/distributions/ArchR/options @@ -8,10 +8,10 @@ HARDENING_SUPPORT="no" # The name of the parent organization for updates - GIT_ORGANIZATION="ArchR" + GIT_ORGANIZATION="archr-linux" # The name of the github project for updates - GIT_REPO="distribution" + GIT_REPO="Arch-R" # Name of the Distro to build (full name, without special characters) DISTRONAME="ArchR" diff --git a/projects/ArchR/packages/archr/sources/scripts/runemu.sh b/projects/ArchR/packages/archr/sources/scripts/runemu.sh index 8a22a1d6e4..d7a58ef0d1 100755 --- a/projects/ArchR/packages/archr/sources/scripts/runemu.sh +++ b/projects/ArchR/packages/archr/sources/scripts/runemu.sh @@ -4,6 +4,11 @@ # Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert) # Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) +# Persist debug log to storage (survives reboot) +RUNEMU_DEBUG="/storage/.cache/log/runemu-debug.log" +exec 2>>"${RUNEMU_DEBUG}" +set -x + # Source predefined functions and variables . /etc/profile . /etc/os-release diff --git a/projects/ArchR/packages/emulators/libretro/retroarch/package.mk b/projects/ArchR/packages/emulators/libretro/retroarch/package.mk index 0c81d2eae6..fdc8545347 100644 --- a/projects/ArchR/packages/emulators/libretro/retroarch/package.mk +++ b/projects/ArchR/packages/emulators/libretro/retroarch/package.mk @@ -55,7 +55,7 @@ case ${DEVICE} in esac if [ "${DISPLAYSERVER}" = "wl" ]; then - PKG_DEPENDS_TARGET+=" wayland" + PKG_DEPENDS_TARGET+=" wayland wayland-protocols wayland:host" PKG_CONFIGURE_OPTS_TARGET+=" --enable-wayland" case ${ARCH} in arm) @@ -104,6 +104,11 @@ pre_configure_target() { sed -i "s|INCLUDES='usr/include usr/local/include'|INCLUDES='${SYSROOT_PREFIX}/usr/include ${SYSROOT_PREFIX}/usr/local/include'|" ${PKG_BUILD}/qb/config.libs.sh fi + # Ensure retroarch configure finds pkg-config (it looks for ${CROSS_COMPILE}pkg-config which doesn't exist) + export PKG_CONF_PATH="${TOOLCHAIN}/bin/pkg-config" + # Ensure pkg-config finds wayland-protocols in share/pkgconfig and wayland-scanner in toolchain + export PKG_CONFIG_PATH="${SYSROOT_PREFIX}/usr/lib/pkgconfig:${SYSROOT_PREFIX}/usr/share/pkgconfig:${TOOLCHAIN}/lib/pkgconfig:${TOOLCHAIN}/share/pkgconfig" + # Disable pipewire for arm 32-bit compat (headers not in arm sysroot) if [ "${TARGET_ARCH}" = "arm" ]; then PKG_CONFIGURE_OPTS_TARGET+=" --disable-pipewire" diff --git a/projects/ArchR/packages/emulators/libretro/retroarch/retroarch-joypads/package.mk b/projects/ArchR/packages/emulators/libretro/retroarch/retroarch-joypads/package.mk index 124360b9ea..ccd66a1bda 100644 --- a/projects/ArchR/packages/emulators/libretro/retroarch/retroarch-joypads/package.mk +++ b/projects/ArchR/packages/emulators/libretro/retroarch/retroarch-joypads/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="38cf938bba0adbde375972053068f10d955a9d14" PKG_LICENSE="GPL" PKG_SITE="https://github.com/libretro/retroarch-joypad-autoconfig" PKG_URL="https://github.com/libretro/retroarch-joypad-autoconfig/archive/${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="" +PKG_DEPENDS_TARGET="toolchain" PKG_LONGDESC="RetroArch joypad autoconfigs." PKG_TOOLCHAIN="manual" diff --git a/projects/ArchR/packages/emulators/libretro/retroarch/sources/RK3326/retroarch.cfg b/projects/ArchR/packages/emulators/libretro/retroarch/sources/RK3326/retroarch.cfg index 099eec8426..1082ac1dc1 100755 --- a/projects/ArchR/packages/emulators/libretro/retroarch/sources/RK3326/retroarch.cfg +++ b/projects/ArchR/packages/emulators/libretro/retroarch/sources/RK3326/retroarch.cfg @@ -730,11 +730,11 @@ video_allow_rotate = "true" video_aspect_ratio = "-1.000000" video_aspect_ratio_auto = "true" video_black_frame_insertion = "0" -video_context_driver = "" +video_context_driver = "wayland" video_crop_overscan = "true" video_ctx_scaling = "false" video_disable_composition = "false" -video_driver = "gl" +video_driver = "glcore" video_filter = "" video_filter_dir = "~/.config/retroarch/filters/video" video_font_enable = "true" @@ -745,8 +745,8 @@ video_force_srgb_disable = "false" video_frame_delay = "0" video_frame_delay_auto = "false" video_fullscreen = "true" -video_fullscreen_x = "480" -video_fullscreen_y = "320" +video_fullscreen_x = "0" +video_fullscreen_y = "0" video_gpu_record = "false" video_gpu_screenshot = "false" video_hard_sync = "false" diff --git a/scripts/build_distro b/scripts/build_distro index 49a26a3840..f3e02e32f8 100755 --- a/scripts/build_distro +++ b/scripts/build_distro @@ -8,6 +8,9 @@ set -e +# Export OFFICIAL so it reaches scripts/image via make +[ -n "${OFFICIAL}" ] && export OFFICIAL + scripts/checkdeps if [ -z "${ARCH}" ]; then diff --git a/scripts/image b/scripts/image index dd3d40316a..1a7a646ac0 100755 --- a/scripts/image +++ b/scripts/image @@ -89,7 +89,13 @@ DISTRO_VERSION=$(date +%Y%m%d) # Get origin url, fix git:// and git@github.com: urls if necessary ORIGIN_URL="$(git remote -v | awk '$1 == "origin" { print $2 }' | head -1 | sed -e 's#\.git$##' -e 's#^git:#https:#' -e 's#^git@github\.com:#https://github.com/#' -e 's#://.*@#://#')" -eval "$(base64 -d <<< aWYgWyAiJHtPRkZJQ0lBTH0iID0gInllcyIgXTsgdGhlbgogIGV4cG9ydCBPU19CVUlMRD0ib2ZmaWNpYWwiCmVsaWYgWyAiJHtOSUdIVExZfSIgPSAieWVzIiBdOyB0aGVuCiAgZXhwb3J0IE9TX0JVSUxEPSJuaWdodGx5IgplbHNlCiAgZXhwb3J0IE9TX0JVSUxEPSJjb21tdW5pdHkiCmZp)" +if [ "${OFFICIAL}" = "yes" ]; then + export OS_BUILD="official" +elif [ "${NIGHTLY}" = "yes" ]; then + export OS_BUILD="nightly" +else + export OS_BUILD="community" +fi if [ -n "${CUSTOM_VERSION}" ]; then DISTRO_VERSION="${CUSTOM_VERSION}"