Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Commit 10b6e9c

Browse files
committed
Update from Azure Pipelines, update for latest libctru
1 parent a9cc624 commit 10b6e9c

File tree

6 files changed

+177
-95
lines changed

6 files changed

+177
-95
lines changed

.github/workflows/build.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
name: Build Project-Athena
2+
3+
on:
4+
push:
5+
branches-ignore: [translation]
6+
paths-ignore:
7+
- 'README.md'
8+
pull_request:
9+
branches: ["*"]
10+
paths-ignore:
11+
- 'README.md'
12+
release:
13+
types: [published]
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ci-${{ startsWith(github.ref, 'refs/pull') && github.ref || 'publish' }}
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
container: devkitpro/devkitarm
23+
name: Build with Docker using devkitARM
24+
outputs:
25+
commit_tag: ${{ steps.build.outputs.commit_tag }}
26+
commit_hash: ${{ steps.build.outputs.commit_hash }}
27+
author_name: ${{ steps.build.outputs.author_name }}
28+
committer_name: ${{ steps.build.outputs.committer_name }}
29+
commit_subject: ${{ steps.build.outputs.commit_subject }}
30+
commit_message: ${{ steps.build.outputs.commit_message }}
31+
steps:
32+
- name: Checkout repo
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
fetch-depth: 0
37+
- name: Setup environment
38+
run: git config --global safe.directory '*'
39+
- name: Install tools
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install p7zip-full -y
43+
44+
curl -L https://github.com/Epicpkmn11/bannertool/releases/latest/download/bannertool.zip -o bannertool.zip
45+
sudo 7z e bannertool.zip linux-x86_64/bannertool
46+
sudo chmod +x bannertool
47+
mv bannertool /usr/local/bin
48+
rm bannertool.zip
49+
curl -L https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.17/makerom-v0.17-ubuntu_x86_64.zip -o makerom-v0.17-ubuntu_x86_64.zip
50+
sudo 7z e makerom-v0.17-ubuntu_x86_64.zip
51+
sudo chmod +x makerom
52+
mv makerom /usr/local/bin
53+
rm makerom-v0.17-ubuntu_x86_64.zip
54+
- name: Build
55+
id: build
56+
run: |
57+
make
58+
mkdir -p ~/artifacts
59+
cp Project-Athena.3dsx ~/artifacts
60+
cp Project-Athena.cia ~/artifacts
61+
echo ::set-output name=commit_tag::$(git describe --abbrev=0 --tags --exclude git)
62+
echo ::set-output name=commit_hash::$(git log --format=%h -1)
63+
64+
# Webhook info
65+
echo "::set-output name=author_name::$(git log -1 $GITHUB_SHA --pretty=%aN)"
66+
echo "::set-output name=committer_name::$(git log -1 $GITHUB_SHA --pretty=%cN)"
67+
echo "::set-output name=commit_subject::$(git log -1 $GITHUB_SHA --pretty=%s)"
68+
echo "::set-output name=commit_message::$(git log -1 $GITHUB_SHA --pretty=%b)"
69+
- name: Publish build to GH Actions
70+
uses: actions/upload-artifact@v4
71+
with:
72+
path: ~/artifacts/*
73+
name: build
74+
75+
# Only run this for non-PR jobs.
76+
publish_build:
77+
runs-on: ubuntu-latest
78+
name: Publish build
79+
if: ${{ success() && !startsWith(github.ref, 'refs/pull') }}
80+
needs: build
81+
env:
82+
COMMIT_TAG: ${{ needs.build.outputs.commit_tag }}
83+
COMMIT_HASH: ${{ needs.build.outputs.commit_hash }}
84+
AUTHOR_NAME: ${{ needs.build.outputs.author_name }}
85+
COMMIT_SUBJECT: ${{ needs.build.outputs.commit_subject }}
86+
COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }}
87+
steps:
88+
- name: Download artifacts
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: build
92+
path: build
93+
# This one always runs
94+
- name: Delete the 'git' release
95+
run: |
96+
# Get the release ID for tag 'git'
97+
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
98+
CONTENT_TYPE="Content-Type: application/json"
99+
API_URL="https://api.github.com/repos/${{ github.repository }}/releases/tags/git"
100+
101+
RESPONSE=$(curl -H "$AUTH_HEADER" -H "$CONTENT_TYPE" "$API_URL")
102+
STATUS=$(echo $RESPONSE | jq -r .status)
103+
if [ "$STATUS" != "404" ]; then
104+
# If it exists, delete it
105+
ID=$(echo $RESPONSE | jq -r .id)
106+
API_URL="https://api.github.com/repos/${{ github.repository }}/releases/$ID"
107+
curl -XDELETE -H "$AUTH_HEADER" -H "$CONTENT_TYPE" "$API_URL"
108+
fi
109+
110+
# This one only runs for releases
111+
- name: Upload to ${{ github.ref_name }} release
112+
if: ${{ startsWith(github.ref, 'refs/tags') }}
113+
run: |
114+
ID=$(jq -r '.release.id' $GITHUB_EVENT_PATH)
115+
116+
for file in ${{ github.workspace }}/build/*; do
117+
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
118+
CONTENT_LENGTH="Content-Length: $(stat -c%s $file)"
119+
CONTENT_TYPE="Content-Type: application/7z-x-compressed"
120+
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=$(basename $file)"
121+
122+
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL"
123+
done
124+
125+
# This one only runs if it's not a release run
126+
- name: Upload to 'git' release
127+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
128+
run: |
129+
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
130+
CONTENT_TYPE="Content-Type: application/json"
131+
API_URL="https://api.github.com/repos/${{ github.repository }}/releases"
132+
RELEASE_INFO="{\"tag_name\": \"git\", \"name\": \"Continuous Build - $COMMIT_HASH\", \"body\": \"$AUTHOR_NAME - $COMMIT_SUBJECT\n\n$COMMIT_MESSAGE\", \"prerelease\": true}"
133+
134+
RESPONSE=$(curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_TYPE" "$API_URL" -d "$RELEASE_INFO")
135+
ID=$(echo $RESPONSE | jq -r '.id')
136+
137+
for file in ${{ github.workspace }}/build/*; do
138+
CONTENT_LENGTH="Content-Length: $(stat -c%s $file)"
139+
CONTENT_TYPE="Content-Type: application/7z-x-compressed"
140+
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=$(basename $file)"
141+
142+
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL"
143+
done
144+
145+
send_success_webhook:
146+
runs-on: ubuntu-latest
147+
needs: [publish_build, build]
148+
name: Send success webhook
149+
if: ${{ !startsWith(github.ref, 'refs/pull') && success() }}
150+
env:
151+
COMMIT_HASH: ${{ needs.build.outputs.commit_hash }}
152+
AUTHOR_NAME: ${{ needs.build.outputs.author_name }}
153+
COMMITTER_NAME: ${{ needs.build.outputs.committer_name }}
154+
COMMIT_SUBJECT: ${{ needs.build.outputs.commit_subject }}
155+
COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }}
156+
steps:
157+
- name: Send success webhook
158+
run: |
159+
curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-ghactions.sh
160+
chmod +x send.sh
161+
./send.sh success ${{ secrets.WEBHOOK_URL }}
162+
send_failure_webhook:
163+
runs-on: ubuntu-latest
164+
needs: [publish_build, build]
165+
name: Send failure webhook
166+
if: ${{ !startsWith(github.ref, 'refs/pull') && failure() }}
167+
steps:
168+
- name: Send failure webhook
169+
run: |
170+
curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-ghactions.sh
171+
chmod +x send.sh
172+
./send.sh failure ${{ secrets.WEBHOOK_URL }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ CFLAGS := -g -Wall -O2 -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSIO
7878
-fomit-frame-pointer -ffunction-sections \
7979
$(ARCH)
8080

81-
CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE=1
81+
CFLAGS += $(INCLUDE) -D__3DS__ -D_GNU_SOURCE=1
8282

8383
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
8484

azure-pipelines.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

include/core/gameLoader.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#include <3ds.h>
3333
#include <memory>
34+
#include <vector>
3435

3536
namespace GameLoader
3637
{

source/gui/screens/mainMenu.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void MainMenu::TitleSelectionLogic(u32 hDown) {
166166
{
167167
if (selectedTitle == (int)GameLoader::installedTitles.size() - 1 || selectedTitle == maxTitles - 1)
168168
{
169-
if (GameLoader::installedTitles.size() > maxTitles && selectedTitle > maxTitles - 1)
169+
if ((int)GameLoader::installedTitles.size() > maxTitles && selectedTitle > maxTitles - 1)
170170
{
171171
if (selectedTitle > maxTitles - 1)
172172
{
@@ -193,15 +193,15 @@ void MainMenu::TitleSelectionLogic(u32 hDown) {
193193
{
194194
if (selectedTitle == -1)
195195
{
196-
selectedTitle = GameLoader::installedTitles.size() < maxTitles ? GameLoader::installedTitles.size() - 1 : maxTitles - 1;
196+
selectedTitle = (int)GameLoader::installedTitles.size() < maxTitles ? GameLoader::installedTitles.size() - 1 : maxTitles - 1;
197197
}
198198
else if (selectedTitle == maxTitles)
199199
{
200200
selectedTitle = (int)GameLoader::installedTitles.size() - 1;
201201
}
202202
else if (selectedTitle == 0)
203203
{
204-
selectedTitle = GameLoader::installedTitles.size() > maxTitles ? maxTitles - 1 : (int)GameLoader::installedTitles.size() - 1;
204+
selectedTitle = (int)GameLoader::installedTitles.size() > maxTitles ? maxTitles - 1 : (int)GameLoader::installedTitles.size() - 1;
205205
}
206206
else
207207
{

source/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ int main() {
6464
Gui::init();
6565
acInit();
6666
amInit();
67-
sdmcInit();
6867
cfguInit();
6968
osSetSpeedupEnable(true); // Enable speed-up for New 3DS users
7069

@@ -104,7 +103,6 @@ int main() {
104103
}
105104
// Exit every process.
106105
cfguExit();
107-
sdmcExit();
108106
acExit();
109107
amExit();
110108
Gui::exit();

0 commit comments

Comments
 (0)