~thestr4ng3r/chiaki

7d820bd4ab9fa3bc8614b4dff558b55a3db577a0 — Florian Märkl 2 months ago aa3a3b8
Update and fix CI

* appimage: switched to bionic
* android: updated container for nanopb changes
* switch: updated devkitpro and simpler cmake scripts
M .builds/android.yml => .builds/android.yml +1 -1
@@ 22,7 22,7 @@ tasks:
    sudo docker run \
      -v /home/build:/home/build \
      -u $(id -u):$(id -g) \
      thestr4ng3r/android:f064ea6 \
      thestr4ng3r/android:b2853cc \
      /bin/bash -c "cd /home/build/chiaki/android && ./gradlew assembleRelease bundleRelease"
    cp chiaki/android/app/build/outputs/apk/release/app-release*.apk Chiaki.apk
    cp chiaki/android/app/build/outputs/bundle/release/app-release*.aab Chiaki.aab

M .builds/common.yml => .builds/common.yml +1 -1
@@ 1,5 1,5 @@

image: alpine/latest
image: alpine/edge # on edge for https://gitlab.alpinelinux.org/alpine/aports/-/issues/13287

sources:
  - https://git.sr.ht/~thestr4ng3r/chiaki

M .gitmodules => .gitmodules +1 -1
@@ 15,4 15,4 @@
	url = https://github.com/google/oboe
[submodule "switch/borealis"]
	path = switch/borealis
	url = https://github.com/natinusala/borealis.git
	url = https://git.sr.ht/~thestr4ng3r/borealis

M cmake/switch.cmake => cmake/switch.cmake +3 -23
@@ 1,34 1,15 @@

# Find DEVKITPRO
set(DEVKITPRO "$ENV{DEVKITPRO}" CACHE PATH "Path to DevKitPro")
set(PORTLIBS_PREFIX "$ENV{PORTLIBS_PREFIX}" CACHE PATH "Path to portlibs inside DevKitPro")
if(NOT DEVKITPRO OR NOT PORTLIBS_PREFIX)
	message(FATAL_ERROR "Please set DEVKITPRO & PORTLIBS_PREFIX env before calling cmake. https://devkitpro.org/wiki/Getting_Started")
if(NOT DEVKITPRO)
	message(FATAL_ERROR "Please set DEVKITPRO env before calling cmake. https://devkitpro.org/wiki/Getting_Started")
endif()

# include devkitpro toolchain
include("${DEVKITPRO}/switch.cmake")
include("${DEVKITPRO}/cmake/Switch.cmake")

set(NSWITCH TRUE)

# Enable gcc -g, to use
# /opt/devkitpro/devkitA64/bin/aarch64-none-elf-addr2line -e build_switch/switch/chiaki -f -p -C -a 0xCCB5C
# set(CMAKE_BUILD_TYPE Debug)
# set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Shared libs not available" )

# FIXME rework this file to use the toolchain only
# https://github.com/diasurgical/devilutionX/pull/764
set(ARCH "-march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -ftls-model=local-exec")
# set(CMAKE_C_FLAGS "-O2 -ffunction-sections ${ARCH}")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
# workaroud force -fPIE to avoid
# aarch64-none-elf/bin/ld: read-only segment has dynamic relocations
set(CMAKE_EXE_LINKER_FLAGS "-specs=${DEVKITPRO}/libnx/switch.specs ${ARCH} -fPIE -Wl,-Map,Output.map")

# add portlibs to the list of include dir
include_directories("${PORTLIBS_PREFIX}/include")

# troubleshoot
message(STATUS "CMAKE_FIND_ROOT_PATH = ${CMAKE_FIND_ROOT_PATH}")
message(STATUS "PKG_CONFIG_EXECUTABLE = ${PKG_CONFIG_EXECUTABLE}")


@@ 79,4 60,3 @@ function(add_nro_target output_name target title author version icon romfs)
endfunction()

set(CMAKE_USE_SYSTEM_ENVIRONMENT_PATH OFF)
set(CMAKE_PREFIX_PATH "/")

R scripts/Dockerfile.xenial => scripts/Dockerfile.bionic +6 -3
@@ 1,9 1,12 @@

FROM ubuntu:xenial
FROM ubuntu:bionic

RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:beineri/opt-qt-5.12.3-xenial
RUN apt-get install -y software-properties-common gpg wget
RUN add-apt-repository ppa:beineri/opt-qt-5.12.10-bionic
COPY kitware-archive-latest.asc /kitware-archive-latest.asc
RUN cat /kitware-archive-latest.asc | gpg --dearmor > /usr/share/keyrings/kitware-archive-keyring.gpg
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' > /etc/apt/sources.list.d/kitware.list
RUN apt-get update
RUN apt-get -y install git g++ cmake ninja-build curl pkg-config unzip python3-pip \
	libssl-dev libopus-dev qt512base qt512multimedia qt512svg \

A scripts/kitware-archive-latest.asc => scripts/kitware-archive-latest.asc +64 -0
@@ 0,0 1,64 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGDUi2gBEADN2Y/itvSMdQDUfdUVSVU+bhTE/8D6OdahIBmCcRqNj6qF+qLD
nXldbpUgqEaJlGOBaBKAueUgj+5ayLjY50gKLz6XsaIBgd/20tEm241VJzIx3ODQ
aMqnZdeKhtE22CV9rj4TLNyUd/fuQ74SkWcJq4GqjYGbDDEi6XGrrGDbOAhJc4aR
FNPRD99QM1R3poWr81hbS/Xss0ilwSudgag4htHsWYGztSMg5H53CmfpKQ2nUqZb
8+LznxcBmyocJGrYpwsCNK39CN+JXgZJANoL8AOynmny5LQe8RVb0/K2fjxRVolx
bNpZzWLCqZP8r2v4Lk4Zc6RbwaZhvG0BEHWZBLciGJWtOw499P+zs4DfRK0sG9g4
fi7XSy4ij3ma02EFO0oK6VPbrJ5OlNOSZmaqt5xfxwtkqywp7qnOM/kvLXg/4Jw9
k3t+bqJGf1/HT3QLE+1v+sKyqEoXHecHou8NWm7E33AB19HUQOmzK9eea6RCFJLU
S5wKrnfHxGZqJdT3UPYPGjEnMcg+rnxB09QexvrqAt0UVTbq0XZI9v2I7j5KiwyK
i1kELBKuqp3H0TaS6PUacSuZ72ZIeqmy4xMLAv7v3iN8S0pncHn1LpJS6jw5RoIU
dw22je8AEhuQltqyy2qZvUWOd6vNyB0kwdr6TER7gfFvczMhw+XwhOiOoQARAQAB
tEVLaXR3YXJlIEFwdCBBcmNoaXZlIEF1dG9tYXRpYyBTaWduaW5nIEtleSAoMjAy
MikgPGRlYmlhbkBraXR3YXJlLmNvbT6JAlQEEwEKAD4WIQQLsrv3hiw/sILaeIfi
1GSzNzi9GQUCYNSLaAIbAw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/VQ2hffYcFolvzdtwQWbrY/lfKh+lQe
2S4JvHcSpLF7o91nvF1DNHl7SU6SHOA1uiYT0lojMsl0icKlGK7bGdtZxt2bjTD/
EmH9GEGZ3ur2IwJ4SDo+PJfSJ5pyzh2RfCJw2Sz6gQGnPGP29Au8+SswA6eGQjdw
ixAAgFdv/oCnC7SX++BNWrvGnaAPzV1mgwwCozPhXref2IdSuVjrhihHGndgCQN8
rLj7HY4TYBrS9hwfZEdBmavXRhG/s2epG8oPgQoXL6qgXdXdz3znAJmrRqkjZB/T
yy9zMw9KSG6rBrLhMw2zN0CoHjAbQTFnF7NLVwn3X22ejq7Tn8WDVJqkLE4hqn17
1QqAjt3Tm/sfreP3UXUO9HfMU08bsi7pQ08r3M/5wADDA/zwxyViJSAhwSWLJnZ2
bhTUIQ3Rrw0UoMCjDpzHBMfoTzDW+4oAOm1EFaNQp98tMpRSPomQXCByiJsD5R2R
4mTo1DU8TA/keBL7zM/tkboveERCGae3YGEL8+InOOB82XV6ejqDAWQMty8BwD66
kOGtB5f1WoyrdNgCwVLtzE2njxG9mTKiXkQvObbcCaGd4rsZIS5e899avK/Ut3S1
kzlEbifMArMh8pWmFBPTkTiqaTTF9AYlgJVabdykUZf3CV/JZMrJ4TlEceEdDX26
8nFZ/BQ16wYMoaXQtmvmj4BAjZPXtLGMlA675aIjEPFUACDdADIsINy4MJIuPzK8
eeA+yVEiNpukpYWOBjLRGEmYhkBstuWiCqhmM3Scylf/+p0OTxw3hbZ1jzSJfJri
mnjGy66I7kijir0yXlTp8J48OHoVDXGYWpUi1wtOcnlzrLE=
=cUKW
-----END PGP PUBLIC KEY BLOCK-----

M scripts/run-docker-build-appimage.sh => scripts/run-docker-build-appimage.sh +2 -2
@@ 3,13 3,13 @@
set -xe
cd "`dirname $(readlink -f ${0})`"

docker build -t chiaki-xenial . -f Dockerfile.xenial
docker build -t chiaki-bionic . -f Dockerfile.bionic
cd ..
docker run --rm \
	-v "`pwd`:/build/chiaki" \
	-w "/build/chiaki" \
	--device /dev/fuse \
	--cap-add SYS_ADMIN \
	-t chiaki-xenial \
	-t chiaki-bionic \
	/bin/bash -c "scripts/build-appimage.sh"


M scripts/switch/build.sh => scripts/switch/build.sh +0 -3
@@ 5,10 5,7 @@ set -xveo pipefail
arg1=$1
build="./build"
if [ "$arg1" != "linux" ]; then
	# source /opt/devkitpro/switchvars.sh
	# toolchain="${DEVKITPRO}/switch.cmake"
	toolchain="cmake/switch.cmake"
	export PORTLIBS_PREFIX="$(${DEVKITPRO}/portlibs_prefix.sh switch)"
	build="./build_switch"
fi


M scripts/switch/run-docker-build-chiaki.sh => scripts/switch/run-docker-build-chiaki.sh +1 -1
@@ 6,6 6,6 @@ docker run \
	-v "`pwd`:/build/chiaki" \
	-w "/build/chiaki" \
	-t \
	thestr4ng3r/chiaki-build-switch \
	thestr4ng3r/chiaki-build-switch:35829cc \
	-c "scripts/switch/build.sh"


M switch/borealis => switch/borealis +1 -1
@@ 1,1 1,1 @@
Subproject commit cbdc1b65314d1eeb2799deae5cf6f113d6d67b46
Subproject commit eae1371831d6cebf11b8ebd4c611069bccc6fb9b