mirror of
https://github.com/koreader/koreader.git
synced 2026-12-01 01:38:52 +00:00
103 lines
2.6 KiB
YAML
103 lines
2.6 KiB
YAML
# This workflow is managed by gh actions-lock.
|
|
|
|
name: Build
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs: &INPUTS
|
|
# Mandatory.
|
|
jobs:
|
|
description: 'Run the specified jobs'
|
|
required: true
|
|
type: string
|
|
# Optional.
|
|
artifacts:
|
|
description: 'Generate artifacts'
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
cache_epoch:
|
|
description: 'Cache keys prefix'
|
|
default: 'acai9ooN'
|
|
type: string
|
|
cache_size:
|
|
description: 'Default cache size'
|
|
default: '512M'
|
|
type: string
|
|
fail_fast:
|
|
description: 'Stop remaining jobs on failure'
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
ffi_cdecls_check:
|
|
description: 'Check FFI cdecls are up-to-date'
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
tests:
|
|
description: 'Run tests'
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
workflow_dispatch:
|
|
inputs: *INPUTS
|
|
|
|
defaults:
|
|
run:
|
|
shell: stdbuf --error=L --output=L bash --noprofile --norc -eo pipefail {0}
|
|
|
|
jobs:
|
|
|
|
prepare:
|
|
name: Prepare
|
|
runs-on: ubuntu-26.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7.0.1
|
|
with:
|
|
clean: false
|
|
fetch-depth: 1
|
|
show-progress: false
|
|
sparse-checkout: .ci
|
|
- name: Checkout base
|
|
run: git submodule update --depth 1 --init base
|
|
- name: Generate outputs
|
|
id: generate
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
set -o noglob
|
|
./.ci/build_matrix_generate.sh '${{ toJSON(inputs) }}' ${{ github.ref_type == 'branch' && github.ref || 'master' }} ${{ github.base_ref }}
|
|
outputs:
|
|
jobs: ${{ steps.generate.outputs.jobs }}
|
|
|
|
emulator:
|
|
needs: prepare
|
|
if: |
|
|
!cancelled() &&
|
|
fromJSON(needs.prepare.outputs.jobs).emulator != '[]'
|
|
name: Emulator
|
|
uses: $/.github/workflows/build_matrix.yml
|
|
with:
|
|
cache_epoch: ${{ inputs.cache_epoch }}
|
|
fail_fast: ${{ inputs.fail_fast || true }}
|
|
jobs: ${{ fromJSON(needs.prepare.outputs.jobs).emulator }}
|
|
|
|
platform:
|
|
needs: [prepare, emulator]
|
|
if: |
|
|
!cancelled() &&
|
|
fromJSON(needs.prepare.outputs.jobs).platform != '[]' &&
|
|
contains('skipped success', needs.emulator.result)
|
|
name: Platform
|
|
uses: $/.github/workflows/build_matrix.yml
|
|
with:
|
|
cache_epoch: ${{ inputs.cache_epoch }}
|
|
fail_fast: ${{ inputs.fail_fast }}
|
|
jobs: ${{ fromJSON(needs.prepare.outputs.jobs).platform }}
|
|
|
|
# vim: foldmethod=marker foldlevel=0
|