2020-11-12 05:21:35 +00:00
|
|
|
name: citra-ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "*" ]
|
|
|
|
tags: [ "*" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2021-09-06 15:57:36 +00:00
|
|
|
clang-format:
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-07 14:59:44 +00:00
|
|
|
container:
|
|
|
|
image: citraemu/build-environments:linux-clang-format
|
|
|
|
options: -u 1001
|
2021-09-06 15:57:36 +00:00
|
|
|
steps:
|
2022-05-15 05:31:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-06 15:57:36 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Build
|
|
|
|
env:
|
|
|
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
|
|
|
run: ./.ci/linux-clang-format/docker.sh
|
2020-11-12 05:21:35 +00:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-28 17:50:13 +00:00
|
|
|
image: ["linux-appimage", "linux-fresh", "linux-frozen", "linux-mingw"]
|
2022-10-05 16:43:07 +00:00
|
|
|
container:
|
|
|
|
image: citraemu/build-environments:${{ matrix.image }}
|
|
|
|
options: -u 1001
|
2020-11-12 05:21:35 +00:00
|
|
|
steps:
|
2022-05-15 05:31:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 05:31:34 +00:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.image }}-
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/${{ matrix.image }}/docker.sh
|
|
|
|
env:
|
|
|
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/${{ matrix.image }}/upload.sh
|
2023-05-16 20:01:21 +00:00
|
|
|
if: ${{ matrix.image == 'linux-appimage' || matrix.image == 'linux-mingw' }}
|
2020-11-12 23:57:20 +00:00
|
|
|
env:
|
|
|
|
NAME: ${{ matrix.image }}
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Upload
|
2022-05-15 05:31:34 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-05-16 20:01:21 +00:00
|
|
|
if: ${{ matrix.image == 'linux-appimage' || matrix.image == 'linux-mingw' }}
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.image }}
|
|
|
|
path: artifacts/
|
2022-10-13 02:03:32 +00:00
|
|
|
source:
|
|
|
|
if: ${{ !github.head_ref }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/source/build.sh
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: source
|
|
|
|
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:
|
|
|
|
arch: ["x86_64", "arm64"]
|
2020-11-12 05:21:35 +00:00
|
|
|
steps:
|
2022-05-15 05:31:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 05:31:34 +00:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
path: ~/Library/Caches/ccache
|
2023-03-01 17:58:09 +00:00
|
|
|
key: ${{ runner.os }}-macos-${{ matrix.arch }}-${{ github.sha }}
|
2020-11-12 05:21:35 +00:00
|
|
|
restore-keys: |
|
2023-03-01 17:58:09 +00:00
|
|
|
${{ runner.os }}-macos-${{ matrix.arch }}-
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: ./.ci/macos/deps.sh
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/macos/build.sh
|
|
|
|
env:
|
2023-03-03 13:04:31 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: "11"
|
2020-11-12 05:21:35 +00:00
|
|
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
2023-03-01 17:58:09 +00:00
|
|
|
TARGET_ARCH: ${{ matrix.arch }}
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/macos/upload.sh
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: macos-${{ matrix.arch }}
|
|
|
|
path: artifacts/
|
|
|
|
macos-universal:
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: macos
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Download x86 build
|
|
|
|
uses: actions/download-artifact@master
|
|
|
|
with:
|
|
|
|
name: macos-x86_64
|
|
|
|
path: macos-x86_64/
|
|
|
|
- name: Download ARM64 build
|
|
|
|
uses: actions/download-artifact@master
|
|
|
|
with:
|
|
|
|
name: macos-arm64
|
|
|
|
path: macos-arm64/
|
|
|
|
- name: Create universal app
|
|
|
|
run: ./.ci/macos/universal.sh
|
|
|
|
env:
|
|
|
|
ARTIFACTS: macos-x86_64 macos-arm64
|
|
|
|
# - name: Upload
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: macos
|
|
|
|
# path: artifacts/
|
|
|
|
- name: Delete intermediate artifacts
|
|
|
|
uses: geekyeggo/delete-artifact@v2
|
|
|
|
with:
|
|
|
|
name: |
|
|
|
|
macos-x86_64
|
|
|
|
macos-arm64
|
2020-11-12 05:21:35 +00:00
|
|
|
windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2022-05-15 05:31:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 05:31:34 +00:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
path: ~/.buildcache
|
|
|
|
key: ${{ runner.os }}-win-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-win-
|
|
|
|
- name: Install dependencies
|
|
|
|
run: ./.ci/windows-msvc/deps.sh
|
|
|
|
shell: bash
|
|
|
|
- name: Set up MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2023-06-05 14:29:05 +00:00
|
|
|
- name: Setup Vulkan SDK
|
|
|
|
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
|
|
|
with:
|
|
|
|
vulkan-query-version: latest
|
|
|
|
vulkan-components: Glslang
|
|
|
|
vulkan-use-cache: true
|
|
|
|
- name: Test glslangValidator
|
|
|
|
run: glslangValidator --version
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Build
|
|
|
|
run: ./.ci/windows-msvc/build.sh
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
2022-11-19 20:22:10 +00:00
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/windows-msvc/upload.ps1
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: msvc
|
|
|
|
path: artifacts/
|
2022-04-04 18:18:33 +00:00
|
|
|
android:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-05-15 05:31:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-04 18:18:33 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
2022-05-15 05:31:34 +00:00
|
|
|
uses: actions/cache@v3
|
2022-04-04 18:18:33 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
~/.ccache
|
|
|
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-android-
|
2023-04-06 12:34:35 +00: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 18:18:33 +00:00
|
|
|
- name: Deps
|
|
|
|
run: |
|
2023-06-05 14:29:05 +00: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 18:18:33 +00:00
|
|
|
- name: Build
|
2023-06-11 12:28:18 +00:00
|
|
|
run: JAVA_HOME=$JAVA_HOME_17_X64 ./.ci/android/build.sh
|
2022-08-24 16:42:21 +00:00
|
|
|
- name: Copy and sign artifacts
|
|
|
|
env:
|
|
|
|
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
|
|
|
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
|
|
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
2022-04-18 19:03:12 +00:00
|
|
|
run: ./.ci/android/upload.sh
|
2022-04-04 18:18:33 +00:00
|
|
|
- name: Upload
|
2022-05-15 05:31:34 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-04-04 18:18:33 +00:00
|
|
|
with:
|
|
|
|
name: android
|
|
|
|
path: artifacts/
|
2020-11-12 05:21:35 +00:00
|
|
|
transifex:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: citraemu/build-environments:linux-transifex
|
|
|
|
if: ${{ github.repository == 'citra-emu/citra' && !github.head_ref }}
|
|
|
|
steps:
|
2022-05-15 05:31:34 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-18 08:09:08 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-04-01 05:02:37 +00:00
|
|
|
fetch-depth: 0
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Update Translation
|
|
|
|
run: ./.ci/transifex/docker.sh
|
|
|
|
env:
|
2023-04-01 05:02:37 +00:00
|
|
|
TX_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
|
2020-11-12 05:21:35 +00:00
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-01 17:58:09 +00:00
|
|
|
needs: [build, android, macos-universal, source, windows]
|
2020-11-12 05:21:35 +00:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
steps:
|
2022-05-15 05:31:34 +00: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 12:34:35 +00: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 12:34:35 +00: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 17:50:13 +00:00
|
|
|
asset_paths: '["./**/*.tar.*","./**/*.AppImage","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]'
|