Skip to content

Commit

Permalink
Merge branch '3006.x' into test_batch_9
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcmarrow authored Oct 5, 2023
2 parents f54d6b7 + a932628 commit ef755ee
Show file tree
Hide file tree
Showing 68 changed files with 1,497 additions and 920 deletions.
6 changes: 4 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ relative_files = True
omit =
setup.py
.nox/*
source =
pkg
source_pkgs =
pkg.tests
salt
tests
tools
disable_warnings = module-not-imported


[report]
# Regexes for lines to exclude from consideration
Expand Down
16 changes: 9 additions & 7 deletions .github/actions/build-onedir-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ runs:
with:
path: artifacts/${{ inputs.package-name }}
key: >
${{ inputs.cache-prefix }}|${{ inputs.python-version }}|deps|${{ inputs.platform }}|${{ inputs.arch }}|${{ inputs.package-name }}|
${{ hashFiles(
format('{0}/.relenv/**/*.xz', github.workspace),
'requirements/static/pkg/*/*.txt',
'.github/actions/build-onedir-deps/action.yml',
'cicd/shared-gh-workflows-context.yml'
) }}
${{ inputs.cache-prefix }}|${{ inputs.python-version }}|deps|${{ inputs.platform }}|${{ inputs.arch }}|${{ inputs.package-name }}|${{
hashFiles(
format('{0}/.relenv/**/*.xz', github.workspace),
'requirements/static/pkg/*/*.txt',
'.github/actions/build-onedir-deps/action.yml',
'.github/workflows/build-deps-onedir-*.yml',
'cicd/shared-gh-workflows-context.yml'
)
}}
- name: Install Salt Onedir Package Dependencies
shell: bash
Expand Down
16 changes: 9 additions & 7 deletions .github/actions/build-onedir-salt/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ runs:
with:
path: artifacts/${{ inputs.package-name }}
key: >
${{ inputs.cache-prefix }}|${{ inputs.python-version }}|deps|${{ inputs.platform }}|${{ inputs.arch }}|${{ inputs.package-name }}|
${{ hashFiles(
format('{0}/.relenv/**/*.xz', github.workspace),
'requirements/static/pkg/*/*.txt',
'.github/actions/build-onedir-deps/action.yml',
'cicd/shared-gh-workflows-context.yml'
) }}
${{ inputs.cache-prefix }}|${{ inputs.python-version }}|deps|${{ inputs.platform }}|${{ inputs.arch }}|${{ inputs.package-name }}|${{
hashFiles(
format('{0}/.relenv/**/*.xz', github.workspace),
'requirements/static/pkg/*/*.txt',
'.github/actions/build-onedir-deps/action.yml',
'.github/workflows/build-deps-onedir-*.yml',
'cicd/shared-gh-workflows-context.yml'
)
}}
- name: Download Source Tarball
uses: actions/download-artifact@v3
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/build-deps-onedir-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: Build Packaging Dependencies 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: true
type: string
description: The version of relenv to use
python-version:
required: true
type: string
description: The version of python to use with relenv

env:
RELENV_DATA: "${{ github.workspace }}/.relenv"
COLUMNS: 190
AWS_MAX_ATTEMPTS: "10"
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple

jobs:

build-deps-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:

- name: "Throttle Builds"
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t"
- uses: actions/checkout@v4

- name: Setup Relenv
id: setup-relenv
uses: ./.github/actions/setup-relenv
with:
platform: linux
arch: ${{ matrix.arch }}
version: ${{ inputs.relenv-version }}
cache-seed: ${{ inputs.cache-seed }}
python-version: ${{ inputs.python-version }}

- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Install Salt Packaging Dependencies into Relenv Onedir
uses: ./.github/actions/build-onedir-deps
with:
platform: linux
arch: ${{ matrix.arch }}
python-version: "${{ inputs.python-version }}"
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }}
83 changes: 83 additions & 0 deletions .github/workflows/build-deps-onedir-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Build Packaging Dependencies 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: true
type: string
description: The version of relenv to use
python-version:
required: true
type: string
description: The version of python to use with relenv

env:
RELENV_DATA: "${{ github.workspace }}/.relenv"
COLUMNS: 190
AWS_MAX_ATTEMPTS: "10"
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple

jobs:

build-deps-macos:
name: macOS
if: ${{ inputs.github-hosted-runners }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
arch:
- x86_64
runs-on: macos-12
steps:

- name: "Throttle Builds"
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t"
- uses: actions/checkout@v4

- 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 }}

- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Install Salt Packaging Dependencies into Relenv Onedir
uses: ./.github/actions/build-onedir-deps
with:
platform: darwin
arch: ${{ matrix.arch }}
python-version: "${{ inputs.python-version }}"
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }}
84 changes: 84 additions & 0 deletions .github/workflows/build-deps-onedir-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
name: Build Packaging Dependencies 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: true
type: string
description: The version of relenv to use
python-version:
required: true
type: string
description: The version of python to use with relenv

env:
RELENV_DATA: "${{ github.workspace }}/.relenv"
COLUMNS: 190
AWS_MAX_ATTEMPTS: "10"
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple

jobs:

build-deps-windows:
name: Windows
if: ${{ inputs.github-hosted-runners }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
arch:
- x86
- amd64
runs-on: windows-latest
steps:

- name: "Throttle Builds"
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t"
- uses: actions/checkout@v4

- 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 }}

- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Install Salt Packaging Dependencies into Relenv Onedir
uses: ./.github/actions/build-onedir-deps
with:
platform: windows
arch: ${{ matrix.arch }}
python-version: "${{ inputs.python-version }}"
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }}
Loading

0 comments on commit ef755ee

Please sign in to comment.