diff --git a/.ci/build-linux-aarch64.sh b/.ci/build-linux-aarch64.sh new file mode 100644 index 0000000000..83d56d791c --- /dev/null +++ b/.ci/build-linux-aarch64.sh @@ -0,0 +1,39 @@ +#!/bin/sh -ex + +if [ -z "$CIRRUS_CI" ]; then + cd rpcs3 || exit 1 +fi + +export CC=clang +export CXX=clang++ + +cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_NATIVE_INSTRUCTIONS=OFF \ + -DUSE_PRECOMPILED_HEADERS=OFF \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CFLAGS" \ + -DUSE_SYSTEM_CURL=ON \ + -DUSE_SDL=ON \ + -DUSE_SYSTEM_SDL=ON \ + -DUSE_SYSTEM_FFMPEG=OFF \ + -DUSE_DISCORD_RPC=ON \ + -DOpenGL_GL_PREFERENCE=LEGACY \ + -DSTATIC_LINK_LLVM=ON \ + -DBUILD_LLVM=OFF \ + -G Ninja + +ninja; build_status=$?; + +cd .. + +shellcheck .ci/*.sh + +# If it compiled succesfully let's deploy. +# Azure and Cirrus publish PRs as artifacts only. +{ [ "$CI_HAS_ARTIFACTS" = "true" ]; +} && SHOULD_DEPLOY="true" || SHOULD_DEPLOY="false" + +if [ "$build_status" -eq 0 ] && [ "$SHOULD_DEPLOY" = "true" ]; then + .ci/deploy-linux.sh "aarch64" +fi \ No newline at end of file diff --git a/.ci/build-linux.sh b/.ci/build-linux.sh index 28d0d5d38e..ff81b76a79 100755 --- a/.ci/build-linux.sh +++ b/.ci/build-linux.sh @@ -61,5 +61,5 @@ shellcheck .ci/*.sh } && SHOULD_DEPLOY="true" || SHOULD_DEPLOY="false" if [ "$build_status" -eq 0 ] && [ "$SHOULD_DEPLOY" = "true" ]; then - .ci/deploy-linux.sh + .ci/deploy-linux.sh "x86_64" fi diff --git a/.ci/deploy-linux.sh b/.ci/deploy-linux.sh index 1e22c5ffc9..8440ee2224 100755 --- a/.ci/deploy-linux.sh +++ b/.ci/deploy-linux.sh @@ -2,14 +2,16 @@ cd build || exit 1 +CPU_ARCH="${1:-x86_64}" + if [ "$DEPLOY_APPIMAGE" = "true" ]; then DESTDIR=AppDir ninja install - curl -fsSLo /usr/bin/linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + curl -fsSLo /usr/bin/linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${CPU_ARCH}.AppImage chmod +x /usr/bin/linuxdeploy - curl -fsSLo /usr/bin/linuxdeploy-plugin-qt https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + curl -fsSLo /usr/bin/linuxdeploy-plugin-qt https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${CPU_ARCH}.AppImage chmod +x /usr/bin/linuxdeploy-plugin-qt - curl -fsSLo linuxdeploy-plugin-checkrt.sh https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh + curl -fsSLo linuxdeploy-plugin-checkrt.sh https://github.com/darealshinji/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt.sh chmod +x ./linuxdeploy-plugin-checkrt.sh export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" diff --git a/.cirrus.yml b/.cirrus.yml index 9baec66a1f..cff6bb521d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -114,37 +114,38 @@ freebsd_task: install_script: "sh -ex ./.ci/install-freebsd.sh" script: "./.ci/build-freebsd.sh" -# macos_task: -# timeout_in: 12000m -# homebrew_cache: -# folder: /Users/admin/Library/Caches/Homebrew -# qt_cache: -# folder: /tmp/Qt -# ccache_cache: -# folder: /tmp/ccache_dir -# matrix: -# - name: Cirrus macOS -# macos_instance: -# image: ghcr.io/cirruslabs/macos-monterey-xcode:latest -# mac_script: -# - mkdir artifacts -# - chmod +x ".ci/build-mac.sh" -# - chmod +x ".ci/deploy-mac.sh" -# - ".ci/build-mac.sh" -# env: -# BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts -# ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/ -# CCACHE_DIR: "/tmp/ccache_dir" -# CCACHE_MAXSIZE: 300M -# CI_HAS_ARTIFACTS: true -# UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842 -# UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-mac" -# RELEASE_MESSAGE: "../GitHubReleaseMessage.txt" -# artifacts: -# name: Artifact -# path: "artifacts/*" -# push_script: | -# if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ]; then -# source './.ci/export-cirrus-vars.sh' -# .ci/github-upload.sh -# fi; +linux_aarch64_task: + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}/artifacts + ARTDIR: ${CIRRUS_WORKING_DIR}/artifacts/ + CCACHE_DIR: "/tmp/ccache_dir" + CCACHE_MAXSIZE: 300M + CI_HAS_ARTIFACTS: true + UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f + UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-aarch64" + DEPLOY_APPIMAGE: false + APPDIR: "./appdir" + RELEASE_MESSAGE: "../GitHubReleaseMessage.txt" + COMPILER: clang + ccache_cache: + folder: "/tmp/ccache_dir" + matrix: + - name: Cirrus Linux AArch64 Clang + arm_container: + image: 'docker.io/kd117/rpcs3-ci-aarch64:latest' + cpu: 8 + memory: 8G + clang_script: + - mkdir artifacts + - "sh -ex ./.ci/build-linux-aarch64.sh" + artifacts: + name: Artifact + path: "artifacts/*" +# push_script: | +# if [ "$CIRRUS_REPO_OWNER" = "RPCS3" ] && [ -z "$CIRRUS_PR" ] && [ "$CIRRUS_BRANCH" = "master" ] && [ "$COMPILER" = "gcc" ]; then +# COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp) +# COMM_COUNT=$(git rev-list --count HEAD) +# COMM_HASH=$(git rev-parse --short=8 HEAD +# export AVVER="${COMM_TAG}-${COMM_COUNT} +# .ci/github-upload.sh +# fi;