Skip to content

Commit

Permalink
Deploy aarch64 builds via via GitHub Actions instead of Cirrus
Browse files Browse the repository at this point in the history
  • Loading branch information
hcorion committed Feb 18, 2025
1 parent ec3d9a2 commit 76401ab
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 44 deletions.
70 changes: 35 additions & 35 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,38 +114,38 @@ freebsd_task:
install_script: "sh -ex ./.ci/install-freebsd.sh"
script: "./.ci/build-freebsd.sh"

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: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-arm64"
DEPLOY_APPIMAGE: true
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/rpcs3/rpcs3-ci-jammy-aarch64:1.0'
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" ]; 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;
# 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: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1
# UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-arm64"
# DEPLOY_APPIMAGE: true
# 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/rpcs3/rpcs3-ci-jammy-aarch64:1.0'
# 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" ]; 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;
35 changes: 26 additions & 9 deletions .github/workflows/rpcs3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ concurrency:
env:
BUILD_REPOSITORY_NAME: ${{ github.repository }}
BUILD_SOURCEBRANCHNAME: ${{ github.ref_name }}
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/build
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts
BUILD_SOURCEVERSION: ${{ github.sha }}

jobs:
Linux_Build:
environment: production
strategy:
fail-fast: false
matrix:
Expand All @@ -40,6 +42,8 @@ jobs:
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.0"
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
compiler: clang
UPLOAD_COMMIT_HASH: 6a42c17d487c392a9e5ae63cd79c7b00c5479f45
UPLOAD_REPO_FULL_NAME: "hcorion/rpcs3-linux-builds"
runs-on: ${{ matrix.os }}
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
Expand All @@ -49,6 +53,8 @@ jobs:
ARTDIR: "/root/artifacts"
RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt"
COMPILER: ${{ matrix.compiler }}
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}

steps:
- name: Checkout repository
Expand All @@ -60,7 +66,7 @@ jobs:
uses: actions/cache@main
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-ccache-${{ matrix.compiler }}
key: ${{ runner.os }}-ccache-${{ matrix.compiler }}-${{ runner.arch }}

- name: Docker setup and build
run: |
Expand All @@ -74,20 +80,31 @@ jobs:
${{ matrix.build_sh }}
- name: Upload artifacts
#TODO: Upload artifact to release repository
#condition for release
#if: |
# github.event_name != 'pull_request' &&
# github.repository == 'RPCS3/rpcs3' &&
# github.ref == 'refs/heads/master' &&
# matrix.compiler == 'clang'
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
shell: bash
if: |
github.event_name != 'pull_request' &&
github.repository == 'hcorion/rpcs3' &&
github.ref == 'refs/heads/master' &&
matrix.compiler == 'clang' &&
runner.arch == 'ARM64'
env:
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
run: |
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
Windows_Build:
environment: production
runs-on: windows-latest
env:
COMPILER: msvc
Expand Down

0 comments on commit 76401ab

Please sign in to comment.