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
|
|
|
|
container: citraemu/build-environments:linux-clang-format
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
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:
|
2021-09-06 16:57:36 +01:00
|
|
|
image: ["linux-fresh", "linux-frozen", "linux-mingw"]
|
2020-11-12 05:21:35 +00:00
|
|
|
container: citraemu/build-environments:${{ matrix.image }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.image }}-
|
|
|
|
- name: Query tag name
|
2020-11-21 04:15:59 +00:00
|
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
2020-11-12 05:21:35 +00:00
|
|
|
id: tagName
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/${{ matrix.image }}/docker.sh
|
|
|
|
env:
|
|
|
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/${{ matrix.image }}/upload.sh
|
2021-09-06 16:57:36 +01:00
|
|
|
if: ${{ matrix.image != 'linux-frozen' }}
|
2020-11-12 23:57:20 +00:00
|
|
|
env:
|
|
|
|
NAME: ${{ matrix.image }}
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v2
|
2021-09-06 16:57:36 +01:00
|
|
|
if: ${{ matrix.image != 'linux-frozen' }}
|
2020-11-12 05:21:35 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.image }}
|
|
|
|
path: artifacts/
|
|
|
|
macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/Library/Caches/ccache
|
|
|
|
key: ${{ runner.os }}-macos-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-macos-
|
|
|
|
- name: Query tag name
|
2020-11-21 04:15:59 +00:00
|
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
2020-11-12 05:21:35 +00:00
|
|
|
id: tagName
|
|
|
|
- name: Install dependencies
|
|
|
|
run: ./.ci/macos/deps.sh
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/macos/build.sh
|
|
|
|
env:
|
|
|
|
MACOSX_DEPLOYMENT_TARGET: "10.13"
|
|
|
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
|
|
|
- name: Pack
|
|
|
|
run: ./.ci/macos/upload.sh
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: macos
|
|
|
|
path: artifacts/
|
|
|
|
windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
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
|
|
|
|
- name: Build
|
|
|
|
run: ./.ci/windows-msvc/build.sh
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
2022-04-04 19:18:33 +01:00
|
|
|
android:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
~/.ccache
|
|
|
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-android-
|
|
|
|
- name: Query tag name
|
|
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
|
|
|
id: tagName
|
|
|
|
- name: Deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install ccache -y
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
export NDK_CCACHE=$(which ccache)
|
|
|
|
|
|
|
|
ccache -s
|
|
|
|
|
|
|
|
cd src/android
|
|
|
|
chmod +x ./gradlew
|
|
|
|
./gradlew bundleRelease
|
|
|
|
./gradlew assembleRelease
|
|
|
|
|
|
|
|
ccache -s
|
|
|
|
- name: Copy artifacts
|
|
|
|
run: |
|
|
|
|
mkdir artifacts/
|
|
|
|
cp src/android/app/build/outputs/apk/release/*.apk \
|
|
|
|
src/android/app/build/outputs/bundle/release/*.aab \
|
|
|
|
artifacts/
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-18 08:09:08 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-11-12 05:21:35 +00:00
|
|
|
- name: Update Translation
|
|
|
|
run: ./.ci/transifex/docker.sh
|
|
|
|
env:
|
|
|
|
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build, macos]
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
- name: Query tag name
|
2020-11-21 04:15:59 +00:00
|
|
|
uses: little-core-labs/get-git-tag@v3.0.2
|
2020-11-12 05:21:35 +00:00
|
|
|
id: tagName
|
|
|
|
- name: Create release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ steps.tagName.outputs.tag }}
|
|
|
|
release_name: ${{ steps.tagName.outputs.tag }}
|
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: alexellis/upload-assets@0.2.3
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
asset_paths: '["./**/*.tar.*","./**/*.7z","./**/*.zip"]'
|