diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml new file mode 100644 index 00000000000000..979ea8f9052d40 --- /dev/null +++ b/.github/workflows/compilation.yml @@ -0,0 +1,52 @@ +name: CI-compile + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + container: ghcr.io/frno7/mipsr5900el-gentoo-linux-gnu:main + steps: + - uses: actions/checkout@v3 + + - name: Compile project + env: + INSTALL_MOD_PATH: ../initramfs/ps2/ + INSTALL_MOD_STRIP: 1 + run: | + mv -f /srv/initramfs ../ + make -j $(getconf _NPROCESSORS_ONLN) ps2_defconfig + make -j $(getconf _NPROCESSORS_ONLN) oldconfig + make -j $(getconf _NPROCESSORS_ONLN) vmlinux + make -j $(getconf _NPROCESSORS_ONLN) modules + make -j $(getconf _NPROCESSORS_ONLN) modules_install + make -j $(getconf _NPROCESSORS_ONLN) vmlinuz + cp vmlinuz PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF + + - name: Upload kernel as artifact + if: ${{ success() }} + uses: actions/upload-artifact@v3 + with: + name: "PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF" + path: PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF + + - name: Upload initramfs as artifact + if: ${{ success() }} + uses: actions/upload-artifact@v3 + with: + name: Initramfs + path: usr/initramfs_data.cpio* + + - name: Upload kernel as pre-release + if: github.ref == 'refs/heads/ps2-main' + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: true + automatic_release_tag: "latest" + title: Development build + files: | + PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF + usr/initramfs_data.cpio* diff --git a/.gitignore b/.gitignore index 70580bdd352ccf..febb69159dbc42 100644 --- a/.gitignore +++ b/.gitignore @@ -91,6 +91,7 @@ modules.order !.gitattributes !.gitignore !.mailmap +!.github # # Generated include files