Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .ci/build-linux-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@ fi

shellcheck .ci/*.sh

RPCS3_DIR=$(pwd)

# If we're building using a CI, let's use the runner's directory
if [ -n "$BUILDDIR" ]; then
BUILD_DIR="$BUILDDIR"
else
BUILD_DIR="$RPCS3_DIR/build"
fi

git config --global --add safe.directory '*'

# Pull all the submodules except llvm, opencv, sdl and curl
# shellcheck disable=SC2046
git submodule -q update --init $(awk '/path/ && !/llvm/ && !/opencv/ && !/libsdl-org/ && !/curl/ { print $3 }' .gitmodules)

mkdir build && cd build || exit 1
if [ ! -d "$BUILD_DIR" ]; then
mkdir "$BUILD_DIR" || exit 1
fi

cd "$BUILD_DIR" || exit 1

if [ "$COMPILER" = "gcc" ]; then
# These are set in the dockerfile
Expand All @@ -27,7 +40,7 @@ fi

export LINKER_FLAG="-fuse-ld=${LINKER}"

cmake .. \
cmake "$RPCS3_DIR" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_NATIVE_INSTRUCTIONS=OFF \
-DUSE_PRECOMPILED_HEADERS=OFF \
Expand All @@ -43,13 +56,13 @@ cmake .. \
-DOpenGL_GL_PREFERENCE=LEGACY \
-DLLVM_DIR=/opt/llvm/lib/cmake/llvm \
-DSTATIC_LINK_LLVM=ON \
-DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-DBUILD_RPCS3_TESTS="${BUILD_UNIT_TESTS}" \
-DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-G Ninja

ninja; build_status=$?;

cd ..
cd "$RPCS3_DIR"

# If it compiled succesfully let's deploy.
# Azure and Cirrus publish PRs as artifacts only.
Expand Down
28 changes: 21 additions & 7 deletions .ci/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,27 @@ fi

shellcheck .ci/*.sh

RPCS3_DIR=$(pwd)

# If we're building using a CI, let's use the runner's directory
if [ -n "$BUILDDIR" ]; then
BUILD_DIR="$BUILDDIR"
else
BUILD_DIR="$RPCS3_DIR/build"
fi

git config --global --add safe.directory '*'

# Pull all the submodules except llvm, opencv, sdl and curl
# Note: Tried to use git submodule status, but it takes over 20 seconds
# shellcheck disable=SC2046
git submodule -q update --init $(awk '/path/ && !/llvm/ && !/opencv/ && !/libsdl-org/ && !/curl/ { print $3 }' .gitmodules)

mkdir build && cd build || exit 1
if [ ! -d "$BUILD_DIR" ]; then
mkdir "$BUILD_DIR" || exit 1
fi

cd "$BUILD_DIR" || exit 1

if [ "$COMPILER" = "gcc" ]; then
# These are set in the dockerfile
Expand All @@ -34,7 +47,7 @@ fi

export LINKER_FLAG="-fuse-ld=${LINKER}"

cmake .. \
cmake "$RPCS3_DIR" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_NATIVE_INSTRUCTIONS=OFF \
-DUSE_PRECOMPILED_HEADERS=OFF \
Expand All @@ -54,19 +67,20 @@ cmake .. \
-DOpenGL_GL_PREFERENCE=LEGACY \
-DLLVM_DIR=/opt/llvm/lib/cmake/llvm \
-DSTATIC_LINK_LLVM=ON \
-DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-DBUILD_RPCS3_TESTS="${BUILD_UNIT_TESTS}" \
-DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-G Ninja

ninja; build_status=$?;

cd ..
cd "$RPCS3_DIR"

# 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"
# { [ "$CI_HAS_ARTIFACTS" = "true" ];
# } && SHOULD_DEPLOY="true" || SHOULD_DEPLOY="false"

if [ "$build_status" -eq 0 ] && [ "$SHOULD_DEPLOY" = "true" ]; then
.ci/deploy-linux.sh "x86_64"
echo "deploy-linux placeholder"
# .ci/deploy-linux.sh "x86_64"
fi
23 changes: 22 additions & 1 deletion .ci/deploy-linux.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
#!/bin/sh -ex

cd build || exit 1
RPCS3_DIR=$(pwd)

echo "pwd = $RPCS3_DIR"
ls -la -F

# If we're building using a CI, let's use the runner's directory
if [ -n "$BUILDDIR" ]; then
BUILD_DIR="$BUILDDIR"
else
BUILD_DIR="$RPCS3_DIR/build"
fi
echo "BUILD_DIR = $BUILD_DIR"

cd "$BUILD_DIR" || exit 1

echo "pwd = $(pwd)"
ls -la -F

echo "cd $RPCS3_DIR/rpcs3"
cd "$RPCS3_DIR/rpcs3"
echo "pwd = $(pwd)"
ls -la -F

CPU_ARCH="${1:-x86_64}"

Expand Down
3 changes: 3 additions & 0 deletions .ci/docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ CI_HAS_ARTIFACTS
BUILD_REASON
BUILD_SOURCEVERSION
BUILD_ARTIFACTSTAGINGDIRECTORY
BUILD_BUILDDIRECTORY
BUILD_REPOSITORY_NAME
BUILD_SOURCEBRANCHNAME
APPDIR
ARTDIR
BUILDDIR
RELEASE_MESSAGE
BUILD_UNIT_TESTS
RUN_UNIT_TESTS
# Variables for build matrix
COMPILER
Expand Down
28 changes: 21 additions & 7 deletions .github/workflows/rpcs3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
BUILD_SOURCEBRANCHNAME: ${{ github.ref_name }}
BUILD_SOURCEVERSION: ${{ github.sha }}
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts/
BUILD_BUILDDIRECTORY: ${{ github.workspace }}/rpcs3_build/

jobs:
Linux_Build:
Expand Down Expand Up @@ -52,11 +53,13 @@ jobs:
DEPLOY_APPIMAGE: true
APPDIR: "/rpcs3/build/appdir"
ARTDIR: "/root/artifacts"
BUILDDIR: "/root/rpcs3_build"
RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt"
COMPILER: ${{ matrix.compiler }}
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}
RUN_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF'
BUILD_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF'
RUN_UNIT_TESTS: 'OFF'
steps:
- name: Checkout repository
uses: actions/checkout@main
Expand All @@ -79,15 +82,26 @@ jobs:
--env-file .ci/docker.env \
-v ${{ env.CCACHE_DIR }}:/root/.ccache \
-v ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}:${{ env.ARTDIR }} \
-v ${{ env.BUILD_BUILDDIRECTORY }}:${{ env.BUILDDIR }} \
${{ matrix.docker_img }} \
${{ matrix.build_sh }}

- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: RPCS3 for Linux (${{ runner.arch }}, ${{ matrix.compiler }})
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}/*.AppImage
compression-level: 0
- name: Unit tests
if: github.event_name == 'pull_request'
working-directory: ${{ github.workspace }}
run: |
ls -la -F
ls -la -F rpcs3
mkdir -p my_symlinks
ln -s ${{ env.BUILDDIR }} my_symlinks/build
ctest -j -VV -C Release --test-dir my_symlinks/build --output-on-failure

# - name: Upload artifacts
# uses: actions/upload-artifact@main
# with:
# name: RPCS3 for Linux (${{ runner.arch }}, ${{ matrix.compiler }})
# path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}/*.AppImage
# compression-level: 0

- name: Deploy master build to GitHub Releases
if: |
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/tests/test_fmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace fmt
EXPECT_EQ(lowercase, to_lower_res);

EXPECT_EQ(""s, fmt::to_upper(""));
EXPECT_EQ(uppercase, fmt::to_upper(uppercase));
EXPECT_EQ(uppercase, fmt::to_lower(uppercase));
EXPECT_EQ(uppercase, to_upper_res);
}

Expand Down
Loading