mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
182 lines
5.1 KiB
YAML
182 lines
5.1 KiB
YAML
---
|
|
name: Build Salt Onedir
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
salt-version:
|
|
type: string
|
|
required: true
|
|
description: The Salt version to set prior to building packages.
|
|
github-hosted-runners:
|
|
type: boolean
|
|
required: true
|
|
self-hosted-runners:
|
|
type: boolean
|
|
required: true
|
|
cache-seed:
|
|
required: true
|
|
type: string
|
|
description: Seed used to invalidate caches
|
|
relenv-version:
|
|
required: false
|
|
type: string
|
|
default: 0.12.3
|
|
description: The version of relenv to use
|
|
python-version-linux:
|
|
required: false
|
|
type: string
|
|
default: 3.10.9
|
|
description: The version of python to use with relenv
|
|
python-version-macos:
|
|
required: false
|
|
type: string
|
|
default: 3.10.9
|
|
description: The version of python to use with relenv
|
|
python-version-windows:
|
|
required: false
|
|
type: string
|
|
description: The version of python to use with relenv on Windows
|
|
default: 3.10.9
|
|
|
|
env:
|
|
RELENV_DATA: "${{ github.workspace }}/.relenv"
|
|
|
|
jobs:
|
|
|
|
build-salt-linux:
|
|
name: Linux
|
|
if: ${{ inputs.self-hosted-runners }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch:
|
|
- x86_64
|
|
- aarch64
|
|
runs-on:
|
|
- self-hosted
|
|
- linux
|
|
- ${{ matrix.arch }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Python Tools Scripts
|
|
uses: ./.github/actions/setup-python-tools-scripts
|
|
|
|
- name: Setup Salt Version
|
|
id: setup-salt-version
|
|
uses: ./.github/actions/setup-salt-version
|
|
with:
|
|
salt-version: "${{ inputs.salt-version }}"
|
|
|
|
- name: Setup Relenv
|
|
uses: ./.github/actions/setup-relenv
|
|
id: setup-relenv
|
|
with:
|
|
platform: linux
|
|
arch: ${{ matrix.arch }}
|
|
version: ${{ inputs.relenv-version }}
|
|
cache-seed: ${{ inputs.cache-seed }}
|
|
python-version: ${{ inputs.python-version-linux }}
|
|
|
|
- name: Install Salt into Relenv Onedir
|
|
uses: ./.github/actions/build-onedir-salt
|
|
with:
|
|
platform: linux
|
|
arch: ${{ matrix.arch }}
|
|
salt-version: "${{ inputs.salt-version }}"
|
|
python-version: "${{ inputs.python-version-linux }}"
|
|
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }}
|
|
|
|
|
|
build-salt-windows:
|
|
name: Windows
|
|
if: ${{ inputs.github-hosted-runners }}
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 2
|
|
matrix:
|
|
arch:
|
|
- x86
|
|
- amd64
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Setup Relenv
|
|
id: setup-relenv
|
|
uses: ./.github/actions/setup-relenv
|
|
with:
|
|
platform: windows
|
|
arch: ${{ matrix.arch }}
|
|
version: ${{ inputs.relenv-version }}
|
|
cache-seed: ${{ inputs.cache-seed }}
|
|
python-version: ${{ inputs.python-version-windows }}
|
|
|
|
- name: Setup Python Tools Scripts
|
|
uses: ./.github/actions/setup-python-tools-scripts
|
|
|
|
- name: Setup Salt Version
|
|
id: setup-salt-version
|
|
uses: ./.github/actions/setup-salt-version
|
|
with:
|
|
salt-version: "${{ inputs.salt-version }}"
|
|
|
|
- name: Install Salt into Relenv Onedir
|
|
uses: ./.github/actions/build-onedir-salt
|
|
with:
|
|
platform: windows
|
|
arch: ${{ matrix.arch }}
|
|
salt-version: "${{ inputs.salt-version }}"
|
|
python-version: "${{ inputs.python-version-windows }}"
|
|
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }}
|
|
|
|
|
|
build-salt-macos:
|
|
name: macOS
|
|
if: ${{ inputs.github-hosted-runners }}
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 2
|
|
matrix:
|
|
arch:
|
|
- x86_64
|
|
runs-on: macos-12
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Setup Relenv
|
|
id: setup-relenv
|
|
uses: ./.github/actions/setup-relenv
|
|
with:
|
|
platform: darwin
|
|
arch: ${{ matrix.arch }}
|
|
version: ${{ inputs.relenv-version }}
|
|
cache-seed: ${{ inputs.cache-seed }}
|
|
python-version: ${{ inputs.python-version-macos }}
|
|
|
|
- name: Setup Python Tools Scripts
|
|
uses: ./.github/actions/setup-python-tools-scripts
|
|
|
|
- name: Setup Salt Version
|
|
id: setup-salt-version
|
|
uses: ./.github/actions/setup-salt-version
|
|
with:
|
|
salt-version: "${{ inputs.salt-version }}"
|
|
|
|
- name: Install Salt into Relenv Onedir
|
|
uses: ./.github/actions/build-onedir-salt
|
|
with:
|
|
platform: darwin
|
|
arch: ${{ matrix.arch }}
|
|
salt-version: "${{ inputs.salt-version }}"
|
|
python-version: "${{ inputs.python-version-macos }}"
|
|
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }}
|