mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 17:47:12 -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
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-3DS:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: devkitpro/devkitarm:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Compile
|
||||
- name: Compile 3DS build
|
||||
id: compile
|
||||
run: |
|
||||
make 3ds
|
||||
|
||||
notify-failure:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
||||
steps:
|
||||
- name: Notify failure
|
||||
run: |
|
||||
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\" }"
|
||||
- uses: ./.github/actions/notify_failure
|
||||
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||
with:
|
||||
NOTIFY_MESSAGE: 'Failed to compile 3DS build'
|
||||
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||
|
||||
- uses: ./.github/actions/upload_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
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-haiku:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: haiku/cross-compiler:x86_64-r1beta4
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Compile
|
||||
- name: Compile haiku build
|
||||
id: compile
|
||||
run: |
|
||||
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
|
||||
|
||||
notify-failure:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
||||
steps:
|
||||
- name: Notify failure
|
||||
run: |
|
||||
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\" }"
|
||||
- uses: ./.github/actions/notify_failure
|
||||
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||
with:
|
||||
NOTIFY_MESSAGE: 'Failed to compile Haiku build'
|
||||
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||
|
||||
- uses: ./.github/actions/upload_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
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-PSP:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: pspdev/pspdev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Compile
|
||||
- name: Compile PSP build
|
||||
id: compile
|
||||
run: |
|
||||
make psp
|
||||
|
||||
notify-failure:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
||||
steps:
|
||||
- name: Notify failure
|
||||
run: |
|
||||
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\" }"
|
||||
- uses: ./.github/actions/notify_failure
|
||||
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||
with:
|
||||
NOTIFY_MESSAGE: 'Failed to compile PSP build'
|
||||
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||
|
||||
- uses: ./.github/actions/upload_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
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Compile
|
||||
- name: Compile Wii and GameCube build
|
||||
id: compile
|
||||
run: |
|
||||
make wii
|
||||
make clean
|
||||
make gamecube
|
||||
|
||||
notify-failure:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
if: ${{ always() && (needs.build.result == 'failure') }}
|
||||
steps:
|
||||
- name: Notify failure
|
||||
run: |
|
||||
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\" }"
|
||||
- uses: ./.github/actions/notify_failure
|
||||
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
||||
with:
|
||||
NOTIFY_MESSAGE: 'Failed to compile Wii/Gamecube build'
|
||||
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||
|
||||
- uses: ./.github/actions/upload_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