Skip to content

Packages

Packages #5713

Workflow file for this run

name: Packages
on:
workflow_dispatch:
pull_request:
schedule:
- cron: "0 */6 * * *"
repository_dispatch:
types: [run_build]
jobs:
prepare_jobs:
runs-on: ubuntu-20.04
container: node:lts
steps:
- uses: actions/checkout@v4
- name: Install dependencies
id: set-matrix
run: |
echo "dependant=$(node create-matrix.js dependant)" >> $GITHUB_OUTPUT
echo "non_dependant=$(node create-matrix.js non_dependant)" >> $GITHUB_OUTPUT
outputs:
dependant: ${{ steps.set-matrix.outputs.dependant }}
non_dependant: ${{ steps.set-matrix.outputs.non_dependant }}
build:
needs: [prepare_jobs]
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.prepare_jobs.outputs.non_dependant) }}
env:
SSHPASS: ${{ secrets.SSHPASS }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt-get install fakeroot cmake cmake-data texinfo libtool-bin libarchive-tools xutils-dev python3.11
- name: Prepare Build
run: |
bash ./prepare.sh
- name: Build package
run: |
export VITASDK=/usr/local/vitasdk
export PATH=$(pwd)/../vita-makepkg:$VITASDK/bin:$PATH
bash ./build.sh ${{ matrix.package }}
- name: Rename package
run: |
export FILE=`echo ${{ matrix.package }}/*-arm.tar.xz`
mv $FILE ${{ matrix.package }}/${{ matrix.package }}.tar.xz
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}
path: ${{ matrix.package }}/${{ matrix.package }}.tar.xz
build_depends:
needs: [prepare_jobs, build]
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.prepare_jobs.outputs.dependant) }}
env:
SSHPASS: ${{ secrets.SSHPASS }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Generate actions/download-artifact pattern
id: generate-download-artifact-pattern
run: |
PATTERN=`echo ${{ matrix.package }} | awk 'NF{NF-=1};1' | tr ' ' '|' | awk '{ print "@(" $0 ")" }'`
echo "PATTERN=$PATTERN" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v4
with:
path: package
pattern: ${{ steps.generate-download-artifact-pattern.outputs.PATTERN }}
merge-multiple: true
- name: Install dependencies
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt-get install fakeroot cmake cmake-data texinfo libtool-bin libarchive-tools pkg-config libc6-dev-i386 python3.11
- name: Prepare Build
run: |
bash ./prepare.sh
- name: Install and Build packages
run: |
export VITASDK=/usr/local/vitasdk
export PATH=$(pwd)/../vita-makepkg:$VITASDK/bin:$PATH
for f in ${{ matrix.package }}; do bash ./install_or_build.sh $f; done
- name: Export package
run: |
export PACKAGE=`echo ${{ matrix.package }} | awk '{print $NF}'`
echo "PACKAGE=$PACKAGE" >> $GITHUB_ENV
- name: Rename package
run: |
export FILE=`echo ${{ env.PACKAGE }}/*-arm.tar.xz`
mv $FILE ${{ env.PACKAGE }}/${{ env.PACKAGE }}.tar.xz
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE }}
path: ${{ env.PACKAGE }}/${{ env.PACKAGE }}.tar.xz
upload-releases:
needs: [prepare_jobs, build, build_depends]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: package
merge-multiple: true
- name: Upload release assets
if: contains(github.ref,'refs/heads/master')
run: gh release upload master package/*.tar.xz --clobber
env:
GITHUB_TOKEN: ${{ github.token }}