2020-11-12 05:21:35 +00:00
|
|
|
name: citra-ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "*" ]
|
|
|
|
tags: [ "*" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2021-09-06 16:57:36 +01:00
|
|
|
clang-format:
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-07 15:59:44 +01:00
|
|
|
container:
|
2023-06-29 08:44:13 +01:00
|
|
|
image: citraemu/build-environments:linux-fresh
|
2022-10-07 15:59:44 +01:00
|
|
|
options: -u 1001
|
2021-09-06 16:57:36 +01:00
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-06 16:57:36 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Build
|
|
|
|
env:
|
|
|
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/clang-format.sh
|
|
|
|
source:
|
|
|
|
if: ${{ !github.head_ref }}
|
2020-11-12 05:21:35 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Pack
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/source.sh
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Upload
|
2022-05-15 06:31:34 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
name: source
|
2020-11-12 05:21:35 +00:00
|
|
|
path: artifacts/
|
2023-06-27 01:42:00 +01:00
|
|
|
linux:
|
2022-10-13 03:03:32 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-27 01:42:00 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: ["appimage", "fresh"]
|
|
|
|
container:
|
|
|
|
image: citraemu/build-environments:linux-${{ matrix.target }}
|
|
|
|
options: -u 1001
|
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
|
|
OS: linux
|
|
|
|
TARGET: ${{ matrix.target }}
|
2022-10-13 03:03:32 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-06-27 01:42:00 +01:00
|
|
|
- name: Set up cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.target }}-
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/linux.sh
|
2022-10-13 03:03:32 +01:00
|
|
|
- name: Pack
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/pack.sh
|
|
|
|
if: ${{ matrix.target == 'appimage' }}
|
2022-10-13 03:03:32 +01:00
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v3
|
2023-06-27 01:42:00 +01:00
|
|
|
if: ${{ matrix.target == 'appimage' }}
|
2022-10-13 03:03:32 +01:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
2022-10-13 03:03:32 +01:00
|
|
|
path: artifacts/
|
2020-11-12 05:21:35 +00:00
|
|
|
macos:
|
|
|
|
runs-on: macos-latest
|
2023-03-01 17:58:09 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-06-27 01:42:00 +01:00
|
|
|
target: ["x86_64", "arm64"]
|
|
|
|
env:
|
|
|
|
CCACHE_CPP2: yes
|
|
|
|
CCACHE_SLOPPINESS: time_macros
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
|
|
OS: macos
|
|
|
|
TARGET: ${{ matrix.target }}
|
2020-11-12 05:21:35 +00:00
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 06:31:34 +01:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
2020-11-12 05:21:35 +00:00
|
|
|
restore-keys: |
|
2023-06-27 01:42:00 +01:00
|
|
|
${{ runner.os }}-${{ matrix.target }}-
|
|
|
|
- name: Install tools
|
|
|
|
run: brew install ccache glslang ninja
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Build
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/macos.sh
|
|
|
|
- name: Prepare outputs for caching
|
|
|
|
run: mv build/bundle $OS-$TARGET
|
|
|
|
- name: Cache outputs for universal build
|
|
|
|
uses: actions/cache/save@v3
|
2023-03-01 17:58:09 +00:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
path: ${{ env.OS }}-${{ env.TARGET }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
2023-03-01 17:58:09 +00:00
|
|
|
macos-universal:
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: macos
|
2023-06-27 01:42:00 +01:00
|
|
|
env:
|
|
|
|
OS: macos
|
|
|
|
TARGET: universal
|
2023-03-01 17:58:09 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-06-27 01:42:00 +01:00
|
|
|
- name: Download x86_64 build from cache
|
|
|
|
uses: actions/cache/restore@v3
|
2023-03-01 17:58:09 +00:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
path: ${{ env.OS }}-x86_64
|
|
|
|
key: ${{ runner.os }}-x86_64-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
|
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Download ARM64 build from cache
|
|
|
|
uses: actions/cache/restore@v3
|
2023-03-01 17:58:09 +00:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
path: ${{ env.OS }}-arm64
|
|
|
|
key: ${{ runner.os }}-arm64-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
|
|
|
fail-on-cache-miss: true
|
2023-03-01 17:58:09 +00:00
|
|
|
- name: Create universal app
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/macos-universal.sh
|
2023-03-01 17:58:09 +00:00
|
|
|
env:
|
2023-06-27 01:42:00 +01:00
|
|
|
ARTIFACTS: ${{ env.OS }}-x86_64 ${{ env.OS }}-arm64
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/pack.sh
|
2023-09-12 23:33:23 +01:00
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
|
|
|
path: artifacts/
|
2020-11-12 05:21:35 +00:00
|
|
|
windows:
|
|
|
|
runs-on: windows-latest
|
2023-06-27 01:42:00 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: ["msvc", "msys2"]
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: ${{ (matrix.target == 'msys2' && 'msys2') || 'bash' }} {0}
|
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
|
|
OS: windows
|
|
|
|
TARGET: ${{ matrix.target }}
|
2020-11-12 05:21:35 +00:00
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 06:31:34 +01:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
2020-11-12 05:21:35 +00:00
|
|
|
restore-keys: |
|
2023-06-27 01:42:00 +01:00
|
|
|
${{ runner.os }}-${{ matrix.target }}-
|
2023-08-26 19:15:13 +01:00
|
|
|
- name: Increase Pagefile size
|
|
|
|
uses: al-cheb/configure-pagefile-action@v1.2
|
|
|
|
with:
|
|
|
|
minimum-size: 2GB
|
|
|
|
maximum-size: 6GB
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Set up MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2023-06-27 01:42:00 +01:00
|
|
|
if: ${{ matrix.target == 'msvc' }}
|
2023-08-13 23:45:22 +01:00
|
|
|
- name: Install extra tools (MSVC)
|
2023-06-27 01:42:00 +01:00
|
|
|
run: choco install ccache ninja wget
|
|
|
|
if: ${{ matrix.target == 'msvc' }}
|
2023-08-13 23:45:22 +01:00
|
|
|
- name: Set up Vulkan SDK (MSVC)
|
|
|
|
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
|
|
|
if: ${{ matrix.target == 'msvc' }}
|
|
|
|
with:
|
|
|
|
vulkan-query-version: latest
|
|
|
|
vulkan-components: Glslang
|
|
|
|
vulkan-use-cache: true
|
2023-06-27 01:42:00 +01:00
|
|
|
- name: Set up MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
if: ${{ matrix.target == 'msys2' }}
|
|
|
|
with:
|
|
|
|
msystem: clang64
|
|
|
|
update: true
|
|
|
|
install: git make p7zip
|
|
|
|
pacboy: >-
|
2023-08-13 23:45:22 +01:00
|
|
|
toolchain:p ccache:p cmake:p ninja:p glslang:p
|
2023-07-05 05:00:24 +01:00
|
|
|
qt6-base:p qt6-multimedia:p qt6-multimedia-wmf:p qt6-tools:p qt6-translations:p
|
2023-08-13 23:45:22 +01:00
|
|
|
- name: Test glslang
|
|
|
|
run: glslang --version || glslangValidator --version
|
2023-07-05 05:02:33 +01:00
|
|
|
- name: Disable line ending translation
|
|
|
|
run: git config --global core.autocrlf input
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Build
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/windows.sh
|
2022-11-19 20:22:10 +00:00
|
|
|
- name: Pack
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/pack.sh
|
2022-11-19 20:22:10 +00:00
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
2022-11-19 20:22:10 +00:00
|
|
|
path: artifacts/
|
2022-04-04 19:18:33 +01:00
|
|
|
android:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-27 01:42:00 +01:00
|
|
|
env:
|
|
|
|
OS: android
|
|
|
|
TARGET: universal
|
2022-04-04 19:18:33 +01:00
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-04 19:18:33 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 06:31:34 +01:00
|
|
|
uses: actions/cache@v3
|
2022-04-04 19:18:33 +01:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
~/.ccache
|
|
|
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-android-
|
2023-04-06 13:34:35 +01:00
|
|
|
- name: Set tag name
|
|
|
|
run: |
|
|
|
|
if [[ "$GITHUB_REF_NAME" =~ ^canary- ]] || [[ "$GITHUB_REF_NAME" =~ ^nightly- ]]; then
|
|
|
|
echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
|
|
|
|
fi
|
|
|
|
echo $GIT_TAG_NAME
|
2022-04-04 19:18:33 +01:00
|
|
|
- name: Deps
|
|
|
|
run: |
|
2023-06-05 15:29:05 +01:00
|
|
|
sudo add-apt-repository -y ppa:theofficialgman/gpu-tools
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get install ccache glslang-dev glslang-tools apksigner -y
|
2022-04-04 19:18:33 +01:00
|
|
|
- name: Build
|
2023-06-27 01:42:00 +01:00
|
|
|
run: JAVA_HOME=$JAVA_HOME_17_X64 ./.ci/android.sh
|
2022-08-24 17:42:21 +01:00
|
|
|
env:
|
|
|
|
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
|
|
|
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
|
|
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
2023-06-27 01:42:00 +01:00
|
|
|
- name: Pack
|
|
|
|
run: ../../../.ci/pack.sh
|
|
|
|
working-directory: src/android/app
|
|
|
|
env:
|
|
|
|
UPLOAD_RAW: 1
|
2022-04-04 19:18:33 +01:00
|
|
|
- name: Upload
|
2022-05-15 06:31:34 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-04-04 19:18:33 +01:00
|
|
|
with:
|
2023-06-27 01:42:00 +01:00
|
|
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
|
|
|
path: src/android/app/artifacts/
|
2023-09-19 04:12:28 +01:00
|
|
|
ios:
|
|
|
|
runs-on: macos-latest
|
|
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
env:
|
|
|
|
CCACHE_CPP2: yes
|
|
|
|
CCACHE_SLOPPINESS: time_macros
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
|
|
OS: ios
|
|
|
|
TARGET: arm64
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ env.CCACHE_DIR }}
|
|
|
|
key: ${{ runner.os }}-ios-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-ios-
|
|
|
|
- name: Install tools
|
|
|
|
run: brew install ccache glslang ninja
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/ios.sh
|
2020-11-12 05:21:35 +00:00
|
|
|
transifex:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-29 08:44:13 +01:00
|
|
|
container: citraemu/build-environments:linux-fresh
|
2020-11-12 05:21:35 +00:00
|
|
|
if: ${{ github.repository == 'citra-emu/citra' && !github.head_ref }}
|
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-18 08:09:08 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-04-01 06:02:37 +01:00
|
|
|
fetch-depth: 0
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Update Translation
|
2023-06-27 01:42:00 +01:00
|
|
|
run: ./.ci/transifex.sh
|
2020-11-12 05:21:35 +00:00
|
|
|
env:
|
2023-04-01 06:02:37 +01:00
|
|
|
TX_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
|
2020-11-12 05:21:35 +00:00
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-27 01:42:00 +01:00
|
|
|
needs: [windows, linux, macos-universal, android, source]
|
2020-11-12 05:21:35 +00:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
steps:
|
2022-05-15 06:31:34 +01:00
|
|
|
- uses: actions/download-artifact@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Create release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2023-04-06 13:34:35 +01:00
|
|
|
tag_name: ${{ github.ref_name }}
|
|
|
|
release_name: ${{ github.ref_name }}
|
2020-11-12 05:21:35 +00:00
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
- name: Upload artifacts
|
2023-04-06 13:34:35 +01:00
|
|
|
uses: alexellis/upload-assets@0.4.0
|
2020-11-12 05:21:35 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2023-04-28 18:50:13 +01:00
|
|
|
asset_paths: '["./**/*.tar.*","./**/*.AppImage","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]'
|