-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action
- Loading branch information
Showing
12 changed files
with
197 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: CI-compile | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: ps2dev/ps2dev:v1.0 | ||
# instead of "ps2dev/ps2dev:latest" you can use different tags, for example for old projects you can use "ps2dev/ps2dev:v1.0" | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
apk add build-base git zip | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
git fetch --prune --unshallow | ||
- name: Get short SHA and repository name | ||
id: slug | ||
run: | | ||
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | ||
echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")" | ||
- name: Compile osd | ||
run: | | ||
make -C osd | ||
ls -l osd | ||
# zip HDDChecker-${{ steps.slug.outputs.sha8 }}.zip HDDChecker.elf lang/* | ||
- name: Compile kpatch | ||
run: | | ||
make -C kpatch/patch0100 | ||
make -C kpatch/patch0101 | ||
ls -l kpatch/patch0100 | ||
ls -l kpatch/patch0101 | ||
- name: Upload artifacts | ||
if: ${{ success() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: | | ||
osd/example.elf | ||
kpatch/patch0100/osdsys.elf | ||
kpatch/patch0101/osd110.elf | ||
- name: Create pre-release | ||
if: github.ref == 'refs/heads/main' | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: true | ||
automatic_release_tag: "latest" | ||
title: "Development build" | ||
files: | | ||
osd/example.elf | ||
kpatch/patch0100/osdsys.elf | ||
kpatch/patch0101/osd110.elf | ||
- name: Create Tagged Release Draft | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
draft: true | ||
files: | | ||
osd/example.elf | ||
kpatch/patch0100/osdsys.elf | ||
kpatch/patch0101/osd110.elf |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# _____ ___ ____ ___ ____ | ||
# ____| | ____| | | |____| | ||
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project. | ||
#----------------------------------------------------------------------- | ||
# Copyright (c) 2001-2007 ps2dev - http://www.ps2dev.org | ||
# Licenced under Academic Free License version 2.0 | ||
# Review ps2sdk README & LICENSE files for further details. | ||
# | ||
# Modified startup file for MBR EELOAD | ||
# Removed libc initialization, support for C++ and kernel patches. | ||
|
||
.extern _heap_size | ||
.extern _stack | ||
.extern _stack_size | ||
|
||
.extern Exit | ||
.extern FlushCache | ||
|
||
.set noat | ||
.set noreorder | ||
|
||
.section .start | ||
.align 2 | ||
|
||
.globl _start | ||
.ent _start | ||
_start: | ||
|
||
zerobss: | ||
# clear bss area | ||
|
||
la $2, _fbss | ||
la $3, _end | ||
|
||
1: | ||
sltu $1, $2, $3 | ||
beq $1, $0, 2f | ||
nop | ||
sq $0, ($2) | ||
addiu $2, $2, 16 | ||
j 1b | ||
nop | ||
2: | ||
|
||
setupthread: | ||
# setup current thread | ||
|
||
la $4, _gp | ||
la $5, _stack | ||
la $6, _stack_size | ||
la $7, _args | ||
la $8, _root | ||
move $gp, $4 | ||
addiu $3, $0, 60 | ||
syscall # SetupThread(_gp, _stack, _stack_size, _args, _root) | ||
move $sp, $2 | ||
|
||
# initialize heap | ||
|
||
la $4, _end | ||
la $5, _heap_size | ||
addiu $3, $0, 61 | ||
syscall # SetupHeap(_end, _heap_size) | ||
|
||
# writeback data cache | ||
jal FlushCache # FlushCache(0) | ||
move $4, $0 | ||
|
||
# call main | ||
ei | ||
|
||
la $16, _args | ||
lw $4, ($16) | ||
jal main # main(argc, argv) | ||
addiu $5, $16, 4 | ||
|
||
# call _exit | ||
|
||
j Exit # Exit(retval) (noreturn) | ||
move $4, $2 | ||
.end _start | ||
|
||
.align 3 | ||
|
||
.ent _root | ||
_root: | ||
addiu $3, $0, 35 | ||
syscall # ExitThread() (noreturn) | ||
.end _root | ||
|
||
.bss | ||
.align 6 | ||
_args: | ||
.space 4+16*4+256 # argc, 16 arguments, 256 bytes payload |
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
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
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
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
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
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
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
Oops, something went wrong.