mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
### Motivation: This repo contains reusable workflows, intended for use in _other_ repos. Right now, some of these reusable workflows are nested, i.e. some of the YAML files refer to other YAML files in the repo by a relative path. Unfortunately, this makes them currently unusable locally with `act` because of https://github.com/nektos/act/issues/1875. For now, it appears the only workaround is to have these referred to without the local, relative path. ### Modifications: Use the remote syntax for referencing nested workflows. ### Result: Commands like `act -j unit-tests` will work in repos that aren't NIO itself. --------- Co-authored-by: Franz Busch <privat@franz-busch.de>
46 lines
2.2 KiB
YAML
46 lines
2.2 KiB
YAML
name: Benchmarks
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
benchmark_package_path:
|
|
type: string
|
|
description: "Path to the directory containing the benchmarking package. Defaults to ."
|
|
default: "."
|
|
swift_package_arguments:
|
|
type: string
|
|
description: "Arguments to the switch package command invocation e.g. `--disable-sandbox`"
|
|
linux_5_8_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux 5.8 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_5_9_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_5_10_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_nightly_6_0_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_nightly_main_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
|
|
default: true
|
|
|
|
jobs:
|
|
benchmarks:
|
|
name: Benchmarks
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
|
|
with:
|
|
name: "Benchmarks"
|
|
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q libjemalloc-dev && swift package --package-path ${{ inputs.benchmark_package_path }} ${{ inputs.swift_package_arguments }} benchmark baseline check --check-absolute-path ${{ inputs.benchmark_package_path }}/Thresholds/${SWIFT_VERSION}/"
|
|
matrix_linux_5_8_enabled: ${{ inputs.linux_5_8_enabled }}
|
|
matrix_linux_5_9_enabled: ${{ inputs.linux_5_9_enabled }}
|
|
matrix_linux_5_10_enabled: ${{ inputs.linux_5_10_enabled }}
|
|
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
|
|
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }} |