mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
Let's give Github Actions a go
This commit is contained in:
parent
8967f17973
commit
2aa9e65262
29
.github/actions/notify_failure/action.yml
vendored
Normal file
29
.github/actions/notify_failure/action.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Notify failure
|
||||||
|
description: Sends a notification that compiling a build has failed
|
||||||
|
inputs:
|
||||||
|
BOT_USERNAME:
|
||||||
|
description: 'Username to use for the discord bot message'
|
||||||
|
default: 'CC BuildBot'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
BOT_AVATAR:
|
||||||
|
description: 'URL to use for the avatar of the discord bot message'
|
||||||
|
default: 'https://static.classicube.net/img/cc-cube-small.png'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
NOTIFY_MESSAGE:
|
||||||
|
description: 'Notification message to send'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
WEBHOOK_URL:
|
||||||
|
description: 'Discord webhook URL'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Notify failure
|
||||||
|
shell: sh
|
||||||
|
run: |
|
||||||
|
curl ${{ inputs.WEBHOOK_URL }} -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"username\": \"${{ inputs.BOT_USERNAME }}\", \"avatar_url\": \"${{ inputs.BOT_AVATAR }}\", \"content\": \"${{ inputs.NOTIFY_MESSAGE }}\" }"
|
19
.github/actions/upload_build/action.yml
vendored
Normal file
19
.github/actions/upload_build/action.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: Upload binary
|
||||||
|
description: Uploads a compiled binary
|
||||||
|
inputs:
|
||||||
|
SOURCE_FILE:
|
||||||
|
description: 'Path to file to upload'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
DEST_NAME:
|
||||||
|
description: 'Name to use for the uploaded artifact'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.DEST_NAME }}
|
||||||
|
path: ${{ inputs.SOURCE_FILE }}
|
30
.github/workflows/build_3ds.yml
vendored
30
.github/workflows/build_3ds.yml
vendored
@ -6,21 +6,31 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-3DS:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: devkitpro/devkitarm:latest
|
image: devkitpro/devkitarm:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Compile
|
- name: Compile 3DS build
|
||||||
|
id: compile
|
||||||
run: |
|
run: |
|
||||||
make 3ds
|
make 3ds
|
||||||
|
|
||||||
notify-failure:
|
- uses: ./.github/actions/notify_failure
|
||||||
runs-on: ubuntu-latest
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||||
needs: [build]
|
with:
|
||||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
NOTIFY_MESSAGE: 'Failed to compile 3DS build'
|
||||||
steps:
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||||
- name: Notify failure
|
|
||||||
run: |
|
- uses: ./.github/actions/upload_build
|
||||||
curl ${{ secrets.WEBHOOK_URL }} -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"username\": \"CC BuildBot\", \"avatar_url\": \"https://static.classicube.net/img/cc-cube-small.png\", \"content\": \"Failed to compile 3DS build\" }"
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'ClassiCube-3ds.elf'
|
||||||
|
DEST_NAME: 'ClassiCube-3ds.elf'
|
||||||
|
|
||||||
|
- uses: ./.github/actions/upload_build
|
||||||
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'ClassiCube-3ds.3dsx'
|
||||||
|
DEST_NAME: 'ClassiCube-3ds.3dsx'
|
24
.github/workflows/build_haiku.yml
vendored
24
.github/workflows/build_haiku.yml
vendored
@ -6,22 +6,26 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-haiku:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: haiku/cross-compiler:x86_64-r1beta4
|
image: haiku/cross-compiler:x86_64-r1beta4
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Compile
|
- name: Compile haiku build
|
||||||
|
id: compile
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
x86_64-unknown-haiku-gcc *.c interop_BeOS.cpp -o ClassiCube-haiku -O1 -s -fno-stack-protector -fno-math-errno -Qn -lm -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
|
x86_64-unknown-haiku-gcc *.c interop_BeOS.cpp -o ClassiCube-haiku -O1 -s -fno-stack-protector -fno-math-errno -Qn -lm -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
|
||||||
|
|
||||||
notify-failure:
|
- uses: ./.github/actions/notify_failure
|
||||||
runs-on: ubuntu-latest
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||||
needs: [build]
|
with:
|
||||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
NOTIFY_MESSAGE: 'Failed to compile Haiku build'
|
||||||
steps:
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||||
- name: Notify failure
|
|
||||||
run: |
|
- uses: ./.github/actions/upload_build
|
||||||
curl ${{ secrets.WEBHOOK_URL }} -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"username\": \"CC BuildBot\", \"avatar_url\": \"https://static.classicube.net/img/cc-cube-small.png\", \"content\": \"Failed to compile Haiku build\" }"
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'src/ClassiCube-haiku'
|
||||||
|
DEST_NAME: 'ClassiCube-haiku'
|
24
.github/workflows/build_psp.yml
vendored
24
.github/workflows/build_psp.yml
vendored
@ -6,21 +6,25 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-PSP:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: pspdev/pspdev:latest
|
image: pspdev/pspdev:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Compile
|
- name: Compile PSP build
|
||||||
|
id: compile
|
||||||
run: |
|
run: |
|
||||||
make psp
|
make psp
|
||||||
|
|
||||||
notify-failure:
|
- uses: ./.github/actions/notify_failure
|
||||||
runs-on: ubuntu-latest
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||||
needs: [build]
|
with:
|
||||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
NOTIFY_MESSAGE: 'Failed to compile PSP build'
|
||||||
steps:
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||||
- name: Notify failure
|
|
||||||
run: |
|
- uses: ./.github/actions/upload_build
|
||||||
curl ${{ secrets.WEBHOOK_URL }} -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"username\": \"CC BuildBot\", \"avatar_url\": \"https://static.classicube.net/img/cc-cube-small.png\", \"content\": \"Failed to compile PSP build\" }"
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'ClassiCube-psp.elf'
|
||||||
|
DEST_NAME: 'ClassiCube-psp.elf'
|
30
.github/workflows/build_wiigc.yml
vendored
30
.github/workflows/build_wiigc.yml
vendored
@ -12,17 +12,25 @@ jobs:
|
|||||||
image: devkitpro/devkitppc:latest
|
image: devkitpro/devkitppc:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Compile
|
- name: Compile Wii and GameCube build
|
||||||
|
id: compile
|
||||||
run: |
|
run: |
|
||||||
make wii
|
make wii
|
||||||
make clean
|
|
||||||
make gamecube
|
|
||||||
|
|
||||||
notify-failure:
|
- uses: ./.github/actions/notify_failure
|
||||||
runs-on: ubuntu-latest
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||||
needs: [build]
|
with:
|
||||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
NOTIFY_MESSAGE: 'Failed to compile Wii/Gamecube build'
|
||||||
steps:
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||||
- name: Notify failure
|
|
||||||
run: |
|
- uses: ./.github/actions/upload_build
|
||||||
curl ${{ secrets.WEBHOOK_URL }} -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"username\": \"CC BuildBot\", \"avatar_url\": \"https://static.classicube.net/img/cc-cube-small.png\", \"content\": \"Failed to compile Wii/GameCube build\" }"
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'ClassiCube-wii.elf'
|
||||||
|
DEST_NAME: 'ClassiCube-wii.elf'
|
||||||
|
|
||||||
|
- uses: ./.github/actions/upload_build
|
||||||
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'ClassiCube-wii.dol'
|
||||||
|
DEST_NAME: 'ClassiCube-wii.dol'
|
Loading…
x
Reference in New Issue
Block a user