1
0
Fork 0

CI: fix build and use system openssl

This commit is contained in:
liushuyu 2023-08-06 22:49:37 +08:00
parent fb1e9d2940
commit 09b3fd4606
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
4 changed files with 22 additions and 7 deletions

View File

@ -1,9 +1,9 @@
#!/bin/bash -ex #!/bin/bash -ex
TOPDIR="$(dirname "$0")" # TOPDIR="$(dirname "$0")"
git config user.name "github-actions" # git config user.name "github-actions"
git config user.email "github-actions[bot]@users.noreply.github.com" # git config user.email "github-actions[bot]@users.noreply.github.com"
#git am "$TOPDIR"/../patches/*.patch #git am "$TOPDIR"/../patches/*.patch
CFLAGS="-ftree-vectorize -flto" CFLAGS="-ftree-vectorize -flto"
@ -25,6 +25,8 @@ export CXXFLAGS="$CFLAGS"
export LDFLAGS="-flto -fuse-linker-plugin -fuse-ld=gold" export LDFLAGS="-flto -fuse-linker-plugin -fuse-ld=gold"
mkdir -p build && cd build 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 ninja citra-room
strip ./bin/Release/citra-room strip ./bin/Release/citra-room

12
.ci/fetch.sh Executable file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.tar.xz

View File

@ -1,14 +1,14 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
FROM debian:bullseye AS build FROM debian:bookworm AS build
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ARG USE_CCACHE ARG USE_CCACHE
RUN apt-get update && apt-get -y full-upgrade && \ 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 COPY . /root/build-files
RUN --mount=type=cache,id=ccache,target=/root/.ccache \ 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 cd /root/citra-canary && /root/build-files/.ci/build.sh
FROM gcr.io/distroless/cc-debian11 AS final FROM gcr.io/distroless/cc-debian11 AS final