diff options
| -rwxr-xr-x | .ci/scripts/clang/docker.sh | 18 | ||||
| -rw-r--r-- | .ci/scripts/clang/exec.sh | 8 | ||||
| -rw-r--r-- | .ci/scripts/clang/upload.sh | 20 | ||||
| -rw-r--r-- | .ci/templates/build-standard.yml | 5 |
4 files changed, 50 insertions, 1 deletions
diff --git a/.ci/scripts/clang/docker.sh b/.ci/scripts/clang/docker.sh new file mode 100755 index 000000000..885d74e97 --- /dev/null +++ b/.ci/scripts/clang/docker.sh | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/bin/bash -ex | ||
| 2 | |||
| 3 | # Exit on error, rather than continuing with the rest of the script. | ||
| 4 | set -e | ||
| 5 | |||
| 6 | cd /yuzu | ||
| 7 | |||
| 8 | ccache -s | ||
| 9 | |||
| 10 | mkdir build || true && cd build | ||
| 11 | cmake .. -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/clang -DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_INSTALL_PREFIX="/usr" | ||
| 12 | |||
| 13 | make -j$(nproc) | ||
| 14 | |||
| 15 | ccache -s | ||
| 16 | |||
| 17 | ctest -VV -C Release | ||
| 18 | |||
diff --git a/.ci/scripts/clang/exec.sh b/.ci/scripts/clang/exec.sh new file mode 100644 index 000000000..e56cd4325 --- /dev/null +++ b/.ci/scripts/clang/exec.sh | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/bin/bash -ex | ||
| 2 | |||
| 3 | mkdir -p "ccache" || true | ||
| 4 | chmod a+x ./.ci/scripts/clang/docker.sh | ||
| 5 | # the UID for the container yuzu user is 1027 | ||
| 6 | sudo chown -R 1027 ./ | ||
| 7 | docker run -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v $(pwd):/yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/clang/docker.sh $1 | ||
| 8 | sudo chown -R $UID ./ | ||
diff --git a/.ci/scripts/clang/upload.sh b/.ci/scripts/clang/upload.sh new file mode 100644 index 000000000..fe4e6b2ac --- /dev/null +++ b/.ci/scripts/clang/upload.sh | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #!/bin/bash -ex | ||
| 2 | |||
| 3 | . .ci/scripts/common/pre-upload.sh | ||
| 4 | |||
| 5 | REV_NAME="yuzu-linux-${GITDATE}-${GITREV}" | ||
| 6 | ARCHIVE_NAME="${REV_NAME}.tar.xz" | ||
| 7 | COMPRESSION_FLAGS="-cJvf" | ||
| 8 | |||
| 9 | if [ "${RELEASE_NAME}" = "mainline" ]; then | ||
| 10 | DIR_NAME="${REV_NAME}" | ||
| 11 | else | ||
| 12 | DIR_NAME="${REV_NAME}_${RELEASE_NAME}" | ||
| 13 | fi | ||
| 14 | |||
| 15 | mkdir "$DIR_NAME" | ||
| 16 | |||
| 17 | cp build/bin/yuzu-cmd "$DIR_NAME" | ||
| 18 | cp build/bin/yuzu "$DIR_NAME" | ||
| 19 | |||
| 20 | . .ci/scripts/common/post-upload.sh | ||
diff --git a/.ci/templates/build-standard.yml b/.ci/templates/build-standard.yml index 7422c8346..57d36f813 100644 --- a/.ci/templates/build-standard.yml +++ b/.ci/templates/build-standard.yml | |||
| @@ -12,6 +12,9 @@ jobs: | |||
| 12 | windows: | 12 | windows: |
| 13 | BuildSuffix: 'windows-mingw' | 13 | BuildSuffix: 'windows-mingw' |
| 14 | ScriptFolder: 'windows' | 14 | ScriptFolder: 'windows' |
| 15 | clang: | ||
| 16 | BuildSuffix: 'clang' | ||
| 17 | ScriptFolder: 'clang' | ||
| 15 | linux: | 18 | linux: |
| 16 | BuildSuffix: 'linux' | 19 | BuildSuffix: 'linux' |
| 17 | ScriptFolder: 'linux' | 20 | ScriptFolder: 'linux' |
| @@ -24,4 +27,4 @@ jobs: | |||
| 24 | parameters: | 27 | parameters: |
| 25 | artifactSource: 'false' | 28 | artifactSource: 'false' |
| 26 | cache: $(parameters.cache) | 29 | cache: $(parameters.cache) |
| 27 | version: $(parameters.version) \ No newline at end of file | 30 | version: $(parameters.version) |