diff --git a/.ci/build.sh b/.ci/build.sh index 5a34994..c6d3e0a 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -1,9 +1,9 @@ #!/bin/bash -ex -TOPDIR="$(dirname "$0")" +# TOPDIR="$(dirname "$0")" -git config user.name "github-actions" -git config user.email "github-actions[bot]@users.noreply.github.com" +# git config user.name "github-actions" +# git config user.email "github-actions[bot]@users.noreply.github.com" #git am "$TOPDIR"/../patches/*.patch CFLAGS="-ftree-vectorize -flto" @@ -25,6 +25,8 @@ export CXXFLAGS="$CFLAGS" export LDFLAGS="-flto -fuse-linker-plugin -fuse-ld=gold" mkdir -p build && cd build -cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DENABLE_QT=OFF -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF -DUSE_DISCORD_PRESENCE=OFF -DENABLE_FFMPEG_VIDEO_DUMPER=OFF +cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DENABLE_QT=OFF \ + -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF -DUSE_DISCORD_PRESENCE=OFF \ + -DENABLE_FFMPEG_VIDEO_DUMPER=OFF -DUSE_SYSTEM_OPENSSL=ON -DCITRA_WARNINGS_AS_ERRORS=OFF -DENABLE_LTO=ON ninja citra-room strip ./bin/Release/citra-room diff --git a/.ci/fetch.sh b/.ci/fetch.sh new file mode 100755 index 0000000..741590c --- /dev/null +++ b/.ci/fetch.sh @@ -0,0 +1,12 @@ +#!/bin/bash -ex + +if [ -z "$1" ]; then + echo "Please specify where to extract the source archive!" + exit 1 +fi + +LATEST_TARBALL="$(wget -O- https://api.github.com/repos/citra-emu/citra-nightly/releases/latest | jq -rc '.assets[] | .browser_download_url | match("https://.+citra-unified-source-.+.xz$") | .string')" + +wget -c "${LATEST_TARBALL}" -O citra-unified.tar.xz +mkdir -pv "$1" +tar --strip-components=1 -C "$1" -xf citra-unified.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b5624b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.tar.xz diff --git a/Dockerfile b/Dockerfile index 7433626..2a4d50f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ # syntax=docker/dockerfile:1.3 -FROM debian:bullseye AS build +FROM debian:bookworm AS build ENV DEBIAN_FRONTEND=noninteractive ARG USE_CCACHE RUN apt-get update && apt-get -y full-upgrade && \ - apt-get install -y build-essential wget git ccache cmake ninja-build libssl-dev + apt-get install -y build-essential wget git ccache cmake ninja-build libssl-dev jq python3 glslang-tools COPY . /root/build-files RUN --mount=type=cache,id=ccache,target=/root/.ccache \ - git clone --depth 1000 --recursive https://github.com/citra-emu/citra-canary.git /root/citra-canary && \ + /root/build-files/.ci/fetch.sh /root/citra-canary && \ cd /root/citra-canary && /root/build-files/.ci/build.sh FROM gcr.io/distroless/cc-debian11 AS final