citra-emu
/
citra-canary
Archived
1
0
Fork 0
This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
citra-canary/.github/workflows/ci.yml

193 lines
5.6 KiB
YAML
Raw Normal View History

name: citra-ci
on:
push:
branches: [ "*" ]
tags: [ "*" ]
pull_request:
branches: [ master ]
jobs:
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
steps:
- uses: actions/checkout@v3
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
build:
runs-on: ubuntu-latest
strategy:
matrix:
image: ["linux-fresh", "linux-frozen", "linux-mingw"]
container:
image: citraemu/build-environments:${{ matrix.image }}
options: -u 1001
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
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
id: tagName
- name: Build
run: ./.ci/${{ matrix.image }}/docker.sh
env:
ENABLE_COMPATIBILITY_REPORTING: "ON"
- name: Pack
run: ./.ci/${{ matrix.image }}/upload.sh
if: ${{ matrix.image != 'linux-frozen' }}
2020-11-12 23:57:20 +00:00
env:
NAME: ${{ matrix.image }}
- name: Upload
uses: actions/upload-artifact@v3
if: ${{ matrix.image != 'linux-frozen' }}
with:
name: ${{ matrix.image }}
path: artifacts/
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/
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
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
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"
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
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 18:18:33 +00:00
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2022-04-04 18:18:33 +00:00
with:
submodules: recursive
- name: Set up cache
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-
- name: Query tag name
uses: little-core-labs/get-git-tag@v3.0.2
id: tagName
- name: Deps
run: |
sudo apt-get update
2022-08-24 16:42:21 +00:00
sudo apt-get install ccache apksigner -y
2022-04-04 18:18:33 +00:00
- name: Build
run: ./.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 }}
run: ./.ci/android/upload.sh
2022-04-04 18:18:33 +00:00
- name: Upload
uses: actions/upload-artifact@v3
2022-04-04 18:18:33 +00:00
with:
name: android
path: artifacts/
transifex:
runs-on: ubuntu-latest
container: citraemu/build-environments:linux-transifex
if: ${{ github.repository == 'citra-emu/citra' && !github.head_ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Update Translation
run: ./.ci/transifex/docker.sh
env:
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [build, android, macos, source]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/download-artifact@v3
- name: Query tag name
2020-11-21 04:15:59 +00:00
uses: little-core-labs/get-git-tag@v3.0.2
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:
2022-08-24 16:42:21 +00:00
asset_paths: '["./**/*.tar.*","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]'