New IPLSDK #2635
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: ARK-4 | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- 'build.sh' | |
- '.github/ISSUES_TEMPLATE/*' | |
- '.github/screenshots/*' | |
- '.github/wallpapers/*' | |
- 'contrib/PC/ARKUpgrader' | |
- '*.pptx' | |
- 'CHANGELOG.md' | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
check_date: | |
runs-on: ubuntu-latest | |
name: Check latest commit | |
outputs: | |
should_run: ${{ steps.should_run.outputs.should_run }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: print latest_commit | |
run: echo ${{ github.sha }} | |
- id: should_run | |
continue-on-error: true | |
name: check latest commit is less than a day | |
if: ${{ github.event_name == 'schedule' }} | |
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "{name}={should_run::false}" >> $GITHUB_OUTPUT | |
build: | |
needs: check_date | |
if: ${{ needs.check_date.outputs.should_run != 'false' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Version | |
id: get_version | |
run: | | |
echo "VERSION=v$(date +%s)" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: sudo apt-get install autoconf automake bison flex gcc libmpfr-dev libncurses5-dev libreadline-dev libusb-dev make patch subversion texinfo wget git python3 python3-pip python3-pycryptodome mkisofs && sudo pip3 install ecdsa pycryptodome | |
- name: Extract SDK | |
run: sudo 7z -o/usr/local/ x ./contrib/PC/PSPSDK/pspdev.7z | |
- name: Change Permissions | |
run: sudo chown $GITHUB_USER:$GITHUB_USER /usr/local/pspdev && sudo chmod 755 -R /usr/local/pspdev | |
- name: Setup Path | |
run: echo "/usr/local/pspdev/bin" >> $GITHUB_PATH | |
- name: Print PATH | |
run: echo $GITHUB_PATH | |
- name: Fix libmpfr | |
run: sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4 | |
- name: sign_np | |
run: cd .. && curl -OJL "https://github.com/swarzesherz/sign_np/archive/refs/tags/v1.0.2.tar.gz" && tar xvf sign_np-1.0.2.tar.gz && cd sign_np-1.0.2 && make && sudo cp sign_np /usr/local/pspdev/bin | |
- name: mkpsxiso | |
run: cd .. && curl -OJL "https://github.com/Lameguy64/mkpsxiso/releases/download/v2.03/mkpsxiso-2.03-Linux.deb" && sudo apt install ./mkpsxiso-2.03-Linux.deb | |
- name: Making ARK-4 | |
run: make | |
- name: Compressing dist directory up | |
run: | | |
cd ./dist | |
sudo tar czvf ARK-4-\${{ steps.get_version.outputs.VERSION }}.tar.gz * | |
mv ARK-4-\${{ steps.get_version.outputs.VERSION }}.tar.gz .. | |
sudo zip -r ARK-4-\${{ steps.get_version.outputs.VERSION }}.zip * | |
mv ARK-4-\${{ steps.get_version.outputs.VERSION }}.zip .. | |
- name: Making DEBUG Version | |
run: | | |
make clean | |
make DEBUG=1 | |
cd ./dist | |
sudo tar czvf ARK-4-\${{ steps.get_version.outputs.VERSION }}-DEBUG.tar.gz * | |
mv ARK-4-\${{ steps.get_version.outputs.VERSION }}-DEBUG.tar.gz .. | |
sudo zip -r ARK-4-\${{ steps.get_version.outputs.VERSION }}-DEBUG.zip * | |
mv ARK-4-\${{ steps.get_version.outputs.VERSION }}-DEBUG.zip .. | |
- name: upload ARK Release & DEBUG artifact | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.VERSION }} | |
name: ${{ github.sha }} | |
prerelease: true | |
files: | | |
ARK-4-${{ steps.get_version.outputs.VERSION }}.zip | |
ARK-4-${{ steps.get_version.outputs.VERSION }}.tar.gz | |
ARK-4-${{ steps.get_version.outputs.VERSION }}-DEBUG.zip | |
ARK-4-${{ steps.get_version.outputs.VERSION }}-DEBUG.tar.gz | |
- name: Update Test Server | |
# Please don't abuse this or I will have to revert back to the orginal way. | |
run: curl -L 'http://ark-4.ddns.net/automagic?update_test=1' | |
# - name: Update Stable Server | |
# run: curl http://ark-4.ddns.net/automagic?update=1 |