Packages #3777
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: 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@v3 | |
- 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@v3 | |
- 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@v3 | |
with: | |
name: package | |
path: ${{ 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@v3 | |
- uses: actions/download-artifact@v3 | |
- 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 packages | |
run: | | |
export VITASDK=/usr/local/vitasdk | |
export PATH=$(pwd)/../vita-makepkg:$VITASDK/bin:$PATH | |
cd package | |
for f in *.tar.xz; do tar -C $VITASDK/arm-vita-eabi/ -xvf "$f"; done | |
cd .. | |
- name: Build packages | |
run: | | |
export VITASDK=/usr/local/vitasdk | |
export PATH=$(pwd)/../vita-makepkg:$VITASDK/bin:$PATH | |
for f in ${{ matrix.package }}; do bash ./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@v3 | |
with: | |
name: package | |
path: ${{ env.PACKAGE }}/*.tar.xz | |
upload-releases: | |
needs: [prepare_jobs, build, build_depends] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libarchive-tools | |
- uses: termux/[email protected] | |
if: contains(github.ref,'refs/heads/master') | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: package/*.tar.xz | |
overwrite: true | |
file_glob: true | |
tag: ${{ github.ref }} | |
release_name: master |