-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test discord hook Test discord hook Fix discord webhook [ci skip] only master releases [ci skip] Update CMakePresets Test Switch build Update pipeline.yml Update Update pipeline.yml Update pipeline.yml Update pipeline.yml Clean up Update pipeline.yml Update pipeline.yml Update pipeline.yml Update pipeline.yml Update pipeline.yml Update pipeline.yml discordo discordo
- Loading branch information
Showing
4 changed files
with
108 additions
and
65 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 |
---|---|---|
|
@@ -29,7 +29,6 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest, macos-13] | ||
include: | ||
- os: windows-latest | ||
os_name: windows | ||
|
@@ -43,21 +42,36 @@ jobs: | |
- os: macos-13 | ||
os_name: macos-x64 | ||
triplet: x64-osx-dynamic | ||
- os: ubuntu-latest | ||
os_name: switch | ||
triplet: none | ||
env: | ||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | ||
vcpkgCommitId: '0f88ecb8528605f91980b90a2c5bad88e3cb565f' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download Switch deps | ||
if: matrix.os_name == 'switch' | ||
uses: blauqs/actions-download-asset@master | ||
with: | ||
repo: MrRevo3D/impacto | ||
version: buildtag | ||
file: devkitpro.tgz | ||
out: /opt | ||
token: ${{ secrets.SWITCH_BUILD_TOKEN }} | ||
|
||
- name: Cache LibAtrac9 | ||
if: matrix.os_name != 'switch' | ||
uses: actions/cache@v3 | ||
with: | ||
key: libatrac9 | ${{ matrix.os_name }} | ||
path: vendor/LibAtrac9 | ||
|
||
- uses: lukka/get-cmake@latest | ||
- name: Setup vcpkg | ||
if: matrix.os_name != 'switch' | ||
uses: lukka/run-vcpkg@v11 | ||
id: runvcpkg | ||
with: | ||
|
@@ -94,12 +108,28 @@ jobs: | |
run: brew install nasm | ||
if: contains(matrix.os_name, 'macos') | ||
- name: Run CMake with vcpkg.json manifest | ||
if: matrix.os_name != 'switch' | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | ||
configurePreset: ci-release | ||
configurePresetAdditionalArgs: "['-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}', '-DVCPKG_HOST_TRIPLET=${{ matrix.triplet }}', '-DVCPKG_BUILD_TYPE=release']" | ||
buildPreset: CI-Build | ||
|
||
- name: Run Switch build | ||
if: matrix.os_name == 'switch' | ||
run: |- | ||
tar -xzf /opt/devkitpro.tgz -C /opt | ||
export DEVKITPRO=/opt/devkitpro | ||
export DEVKITARM=/opt/devkitpro/devkitARM | ||
export PATH="/opt/devkitpro/tools/bin:$PATH" | ||
cmake . -DCMAKE_TOOLCHAIN_FILE=HorizonNX.toolchain | ||
make -j2 | ||
elf2nro impacto impacto.nro | ||
mkdir -p "${{ github.workspace }}/release/ci-release" | ||
cp impacto.nro "${{ github.workspace }}/release/ci-release" | ||
cp -r profiles "${{ github.workspace }}/release/ci-release" | ||
cp -r games "${{ github.workspace }}/release/ci-release" | ||
- name: Copy docs | ||
run: | | ||
|
@@ -143,23 +173,24 @@ jobs: | |
id: date | ||
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | ||
|
||
# - uses: tsickert/[email protected] | ||
# with: | ||
# thread-id: ${{ secrets.discordChannelId }} | ||
# webhook-url: ${{ secrets.discordWebhookKey }} | ||
# username: IMPACTO | ||
# avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
# embed-title : "${{ github.event.commits[0].author.name }}" | ||
# embed-color: 3659647 | ||
# embed-timestamp: ${{ env.NOW }} | ||
# embed-description: > | ||
# "Commit\n | ||
# `${{ github.event.head_commit.message }} (${{ github.sha }})`\n | ||
# from branch `${{ env.BRANCH_NAME }}` has been successfully built.\n\n | ||
# Release URL:\n | ||
# https://github.com/CommitteeOfZero/impacto/releases/tag/${{ needs.get_version.outputs.version }}\n\n | ||
# Details:\n | ||
# ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
- uses: tsickert/[email protected] | ||
with: | ||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
username: IMPACTO | ||
avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
embed-title : "${{ github.event.commits[0].author.name }}" | ||
embed-color: 3659647 | ||
embed-timestamp: ${{ env.NOW }} | ||
embed-description: | | ||
Commit | ||
`${{ github.event.head_commit.message }} (${{ github.sha }})` | ||
from branch `${{ env.BRANCH_NAME }}` has been successfully built. | ||
Release URL: | ||
https://github.com/CommitteeOfZero/impacto/releases/tag/${{ needs.get_version.outputs.version }} | ||
Details: | ||
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
notify_fail: | ||
name: Notify failure | ||
runs-on: ubuntu-22.04 | ||
|
@@ -175,7 +206,11 @@ jobs: | |
json_data=$(curl -s -H "Authorization: Bearer ${{ github.token }}" \ | ||
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs") | ||
name_conclusion_array=($(echo "$json_data" | jq -r '.jobs[] | select(.name | startswith("job-matrix")) | "\(.name).\(.conclusion)"')) | ||
name_conclusion_array=($(echo "$json_data" | jq -r ' | ||
.jobs[] | | ||
select(.name | IN("macos-arm64", "linux", "windows", "switch", "macos-x64")) | | ||
"\(.name).\(.conclusion)"')) | ||
for item in "${name_conclusion_array[@]}"; do | ||
IFS='.' read -r name conclusion <<< "$item" | ||
|
@@ -186,21 +221,25 @@ jobs: | |
id: date | ||
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT | ||
|
||
# - uses: tsickert/[email protected] | ||
# with: | ||
# thread-id: ${{ secrets.discordChannelId }} | ||
# webhook-url: ${{ secrets.discordWebhookKey }} | ||
# username: IMPACTO | ||
# avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
# embed-title : "${{ github.event.commits[0].author.name }}" | ||
# embed-color: 16711680 | ||
# embed-timestamp: ${{ steps.date.outputs.NOW }} | ||
# embed-description: > | ||
# "Commit\n | ||
# `${{ github.event.head_commit.message }} (${{ github.sha }})`\n | ||
# from branch `${{ env.BRANCH_NAME }}` has failed build.\n\n | ||
# Job status:\n | ||
|
||
# ${{join(steps.get_jobs_status.outputs.*, '\n')}}\n\n | ||
# Details:\n | ||
# ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
- uses: tsickert/[email protected] | ||
with: | ||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
username: IMPACTO | ||
avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png | ||
embed-title : "${{ github.event.commits[0].author.name }}" | ||
embed-color: 16711680 | ||
embed-timestamp: ${{ steps.date.outputs.NOW }} | ||
embed-description: | | ||
Commit | ||
`${{ github.event.head_commit.message }} (${{ github.sha }})` | ||
from branch `${{ env.BRANCH_NAME }}` has failed build. | ||
Job status: | ||
windows: ${{steps.get_jobs_status.outputs.windows}} | ||
linux: ${{steps.get_jobs_status.outputs.linux}} | ||
macos-arm64: ${{steps.get_jobs_status.outputs.macos-arm64}} | ||
macos-x64: ${{steps.get_jobs_status.outputs.macos-x64}} | ||
switch: ${{steps.get_jobs_status.outputs.switch}} | ||
Details: | ||
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
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