PS3: Add working github actions workflow

This commit is contained in:
UnknownShadow200 2024-03-30 22:55:28 +11:00
parent a7488f2a0b
commit 521cc79dd0
4 changed files with 22 additions and 27 deletions

View File

@ -12,7 +12,7 @@ jobs:
container: container:
image: skylyrac/blocksds:dev-latest image: skylyrac/blocksds:dev-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Compile DS build - name: Compile DS build
id: compile id: compile
run: | run: |
@ -24,7 +24,7 @@ jobs:
# otherwise notify_failure doesn't work # otherwise notify_failure doesn't work
- name: Install curl when necessary - name: Install curl when necessary
if: ${{ always() && steps.compile.outcome == 'failure' }} if: ${{ always() && steps.compile.outcome == 'failure' }}
run: apt install curl run: apt-get -y install curl
- uses: ./.github/actions/notify_failure - uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }} if: ${{ always() && steps.compile.outcome == 'failure' }}

View File

@ -29,7 +29,7 @@ jobs:
# otherwise notify_failure doesn't work # otherwise notify_failure doesn't work
- name: Install curl when necessary - name: Install curl when necessary
if: ${{ always() && steps.compile.outcome == 'failure' }} if: ${{ always() && steps.compile.outcome == 'failure' }}
run: apt install curl run: apt-get -y install curl
- uses: ./.github/actions/notify_failure - uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }} if: ${{ always() && steps.compile.outcome == 'failure' }}

View File

@ -10,18 +10,23 @@ jobs:
if: github.ref_name == github.event.repository.default_branch if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: akusiroyo/ps3sdk:latest image: ghcr.io/classicube/minimal-psl1ght:latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Compile PS3 build - name: Compile PS3 build
id: compile id: compile
run: | run: |
pacman -S make --noconfirm
export PSL1GHT=/usr/local/ps3dev
export PS3DEV=/usr/local/ps3dev export PS3DEV=/usr/local/ps3dev
export PSL1GHT=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
make ps3 make ps3
# otherwise notify_failure doesn't work
- name: Install curl when necessary
if: ${{ always() && steps.compile.outcome == 'failure' }}
run: apt-get install -y curl
- uses: ./.github/actions/notify_failure - uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }} if: ${{ always() && steps.compile.outcome == 'failure' }}
with: with:
@ -32,11 +37,11 @@ jobs:
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'ClassiCube-ps3.pkg' SOURCE_FILE: 'ClassiCube-PS3.self'
DEST_NAME: 'ClassiCube-ps3.pkg' DEST_NAME: 'ClassiCube-PS3.self'
- uses: ./.github/actions/upload_build - uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }} if: ${{ always() && steps.compile.outcome == 'success' }}
with: with:
SOURCE_FILE: 'ClassiCube-ps3.elf' SOURCE_FILE: 'ClassiCube-PS3.pkg'
DEST_NAME: 'ClassiCube-ps3.elf' DEST_NAME: 'ClassiCube-PS3.pkg'

View File

@ -49,9 +49,7 @@ void Platform_Log(const char* msg, int len) {
} }
TimeMS DateTime_CurrentUTC(void) { TimeMS DateTime_CurrentUTC(void) {
struct timeval cur; return 0;
gettimeofday(&cur, NULL);
return (cc_uint64)cur.tv_sec + UNIX_EPOCH_SECONDS;
} }
void DateTime_CurrentLocal(struct DateTime* t) { void DateTime_CurrentLocal(struct DateTime* t) {
@ -176,10 +174,6 @@ void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char*
*handle = NULL; *handle = NULL;
} }
void Thread_Start2(void* handle, Thread_StartFunc func) {
// TODO: actual multithreading ???
}
void Thread_Detach(void* handle) { void Thread_Detach(void* handle) {
} }
@ -269,10 +263,6 @@ void Platform_Init(void) {
// TODO: Redesign Drawer2D to better handle this // TODO: Redesign Drawer2D to better handle this
Options_SetBool(OPT_USE_CHAT_FONT, true); Options_SetBool(OPT_USE_CHAT_FONT, true);
//console_init();
//console_set_render_mode(RENDER_AUTOMATIC);
//console_set_debug(true);
dfs_init(DFS_DEFAULT_LOCATION); dfs_init(DFS_DEFAULT_LOCATION);
timer_init(); timer_init();
rtc_init(); rtc_init();