Fixing Compilation in all the available OSs #663
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| repository_dispatch: | |
| types: [run_build] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/pspdev/pspsdk:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| apk add build-base linux-headers readline-dev libusb-dev | |
| - name: Compile project | |
| run: | | |
| make -j $(getconf _NPROCESSORS_ONLN) clean | |
| make -j $(getconf _NPROCESSORS_ONLN) | |
| make -j $(getconf _NPROCESSORS_ONLN) -C pspsh install | |
| make -j $(getconf _NPROCESSORS_ONLN) -C usbhostfs_pc | |
| make release | |
| - name: Upload artifacts | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: psplinkusb | |
| path: release | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Cygwin | |
| uses: egor-tensin/setup-cygwin@v4 | |
| with: | |
| packages: gcc-core gcc-g++ make libreadline8 libreadline-devel libusb1.0 libusb1.0-devel | |
| - name: Compile project | |
| run: | | |
| make -j $(getconf _NPROCESSORS_ONLN) -C pspsh | |
| make -j $(getconf _NPROCESSORS_ONLN) -C usbhostfs_pc | |
| mkdir build | |
| cp usbhostfs_pc\usbhostfs_pc.exe build | |
| cp pspsh\pspsh.exe build | |
| - name: Collect and copy Cygwin DLL dependencies | |
| shell: C:\tools\cygwin\bin\bash.exe --norc -eo pipefail -o igncr '{0}' | |
| run: | | |
| for exe in build/usbhostfs_pc.exe build/pspsh.exe; do | |
| cygcheck "$exe" | grep -E '\.dll$' | grep "\\\\cyg" | while read -r dll; do | |
| [[ -f "$dll" ]] && cp "$dll" build/ | |
| done | |
| done | |
| - name: Upload artifacts | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: psplinkusb-windows | |
| path: build | |
| publish: | |
| needs: [build, windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| - name: Compress & Rename artifacts | |
| run: | | |
| mv psplinkusb/psplink psplink | |
| zip -r psplink.zip psplink | |
| zip -r pspsh-windows.zip psplinkusb-windows | |
| - name: Create pre-release | |
| if: github.ref == 'refs/heads/master' | |
| uses: softprops/[email protected] | |
| with: | |
| files: | | |
| psplink.zip | |
| pspsh-windows.zip | |
| release/psplink_manual.pdf | |
| prerelease: true | |
| name: "Development build" | |
| tag_name: "latest" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/[email protected] | |
| with: | |
| files: | | |
| psplink.zip | |
| pspsh-windows.zip | |
| release/psplink_manual.pdf | |
| tag_name: ${{ github.ref_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |