mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Reduce GitHub Actions cache usage
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
abfc1c82d5
commit
9c5ea5a324
23 changed files with 1731 additions and 4326 deletions
|
@ -70,12 +70,12 @@ jobs:
|
|||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Cache nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.linux.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
|
||||
|
@ -156,5 +156,5 @@ jobs:
|
|||
- name: Upload Nox Requirements Tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nox-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
path: nox.linux.${{ inputs.arch }}.tar.*
|
12
.github/workflows/build-deps-ci-action-macos.yml
vendored
12
.github/workflows/build-deps-ci-action-macos.yml
vendored
|
@ -66,12 +66,12 @@ jobs:
|
|||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Cache nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.macos.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
|
||||
|
@ -126,10 +126,10 @@ jobs:
|
|||
- name: Compress .nox Directory
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
nox --force-color -e compress-dependencies -- ${{ inputs.distro-slug }}
|
||||
nox --force-color -e compress-dependencies -- macos ${{ inputs.arch }}
|
||||
|
||||
- name: Upload Nox Requirements Tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nox-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
name: nox-macos-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
path: nox.macos.${{ inputs.arch }}.tar.*
|
||||
|
|
160
.github/workflows/build-deps-ci-action-windows.yml
vendored
Normal file
160
.github/workflows/build-deps-ci-action-windows.yml
vendored
Normal file
|
@ -0,0 +1,160 @@
|
|||
---
|
||||
name: Install Test Dependencies
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
required: true
|
||||
type: string
|
||||
description: The OS slug to run tests against
|
||||
nox-session:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox session to run
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to running tests.
|
||||
cache-prefix:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform being tested
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.10"
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
description: The onedir package name to use
|
||||
default: salt
|
||||
|
||||
|
||||
env:
|
||||
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:
|
||||
|
||||
dependencies:
|
||||
name: Install
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- bastion
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.windows.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: PyPi Proxy
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
id: spin-up-vm
|
||||
run: |
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true
|
||||
|
||||
- name: Upload Checkout To VM
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm rsync ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Install Dependencies
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Cleanup .nox Directory
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm pre-archive-cleanup ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Compress .nox Directory
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm compress-dependencies ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Download Compressed .nox Directory
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm download-dependencies ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Destroy VM
|
||||
if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Upload Nox Requirements Tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
path: nox.windows.${{ inputs.arch }}.tar.*
|
1028
.github/workflows/ci.yml
vendored
1028
.github/workflows/ci.yml
vendored
File diff suppressed because it is too large
Load diff
1028
.github/workflows/nightly.yml
vendored
1028
.github/workflows/nightly.yml
vendored
File diff suppressed because it is too large
Load diff
694
.github/workflows/release.yml
vendored
694
.github/workflows/release.yml
vendored
|
@ -167,44 +167,12 @@ jobs:
|
|||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
windows-2016-ci-deps:
|
||||
name: Windows 2016 Deps
|
||||
windows-amd64-ci-deps:
|
||||
name: Windows amd64 CI Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
windows-2019-ci-deps:
|
||||
name: Windows 2019 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: windows-2019
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
windows-2022-ci-deps:
|
||||
name: Windows 2022 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
uses: ./.github/workflows/build-deps-ci-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2022
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -215,8 +183,8 @@ jobs:
|
|||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
macos-12-ci-deps:
|
||||
name: macOS 12 Deps
|
||||
macos-x86_64-ci-deps:
|
||||
name: MacOS x86_64 CI Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
|
@ -231,24 +199,8 @@ jobs:
|
|||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
macos-13-ci-deps:
|
||||
name: macOS 13 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action-macos.yml
|
||||
with:
|
||||
distro-slug: macos-13
|
||||
nox-session: ci-test-onedir
|
||||
platform: darwin
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
macos-13-xlarge-ci-deps:
|
||||
name: macOS 13 Arm64 Deps
|
||||
macos-arm64-ci-deps:
|
||||
name: MacOS arm64 CI Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
|
@ -257,162 +209,18 @@ jobs:
|
|||
distro-slug: macos-13-xlarge
|
||||
nox-session: ci-test-onedir
|
||||
platform: darwin
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
almalinux-8-ci-deps:
|
||||
name: Alma Linux 8 Deps
|
||||
linux-x86_64-ci-deps:
|
||||
name: Linux x86_64 CI Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: almalinux-8
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
almalinux-8-arm64-ci-deps:
|
||||
name: Alma Linux 8 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: almalinux-8-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
almalinux-9-ci-deps:
|
||||
name: Alma Linux 9 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: almalinux-9
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
almalinux-9-arm64-ci-deps:
|
||||
name: Alma Linux 9 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: almalinux-9-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
amazonlinux-2-ci-deps:
|
||||
name: Amazon Linux 2 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: amazonlinux-2
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
amazonlinux-2-arm64-ci-deps:
|
||||
name: Amazon Linux 2 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: amazonlinux-2-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
amazonlinux-2023-ci-deps:
|
||||
name: Amazon Linux 2023 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: amazonlinux-2023
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
amazonlinux-2023-arm64-ci-deps:
|
||||
name: Amazon Linux 2023 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: amazonlinux-2023-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
archlinux-lts-ci-deps:
|
||||
name: Arch Linux LTS Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: archlinux-lts
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
centos-7-ci-deps:
|
||||
name: CentOS 7 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
uses: ./.github/workflows/build-deps-ci-action-linux.yml
|
||||
with:
|
||||
distro-slug: centos-7
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -423,401 +231,17 @@ jobs:
|
|||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
centos-7-arm64-ci-deps:
|
||||
name: CentOS 7 Arm64 Deps
|
||||
linux-arm64-ci-deps:
|
||||
name: Linux arm64 CI Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
uses: ./.github/workflows/build-deps-ci-action-linux.yml
|
||||
with:
|
||||
distro-slug: centos-7-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
centosstream-8-ci-deps:
|
||||
name: CentOS Stream 8 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: centosstream-8
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
centosstream-8-arm64-ci-deps:
|
||||
name: CentOS Stream 8 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: centosstream-8-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
centosstream-9-ci-deps:
|
||||
name: CentOS Stream 9 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: centosstream-9
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
centosstream-9-arm64-ci-deps:
|
||||
name: CentOS Stream 9 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: centosstream-9-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
debian-10-ci-deps:
|
||||
name: Debian 10 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: debian-10
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
debian-11-ci-deps:
|
||||
name: Debian 11 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: debian-11
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
debian-11-arm64-ci-deps:
|
||||
name: Debian 11 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: debian-11-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
debian-12-ci-deps:
|
||||
name: Debian 12 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: debian-12
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
debian-12-arm64-ci-deps:
|
||||
name: Debian 12 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: debian-12-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
fedora-37-ci-deps:
|
||||
name: Fedora 37 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: fedora-37
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
fedora-37-arm64-ci-deps:
|
||||
name: Fedora 37 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: fedora-37-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
fedora-38-ci-deps:
|
||||
name: Fedora 38 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: fedora-38
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
fedora-38-arm64-ci-deps:
|
||||
name: Fedora 38 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: fedora-38-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
opensuse-15-ci-deps:
|
||||
name: Opensuse 15 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: opensuse-15
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
photonos-3-ci-deps:
|
||||
name: Photon OS 3 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: photonos-3
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
photonos-3-arm64-ci-deps:
|
||||
name: Photon OS 3 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: photonos-3-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
photonos-4-ci-deps:
|
||||
name: Photon OS 4 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: photonos-4
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
photonos-4-arm64-ci-deps:
|
||||
name: Photon OS 4 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: photonos-4-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
photonos-5-ci-deps:
|
||||
name: Photon OS 5 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: photonos-5
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
photonos-5-arm64-ci-deps:
|
||||
name: Photon OS 5 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: photonos-5-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
ubuntu-2004-ci-deps:
|
||||
name: Ubuntu 20.04 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: ubuntu-20.04
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
ubuntu-2004-arm64-ci-deps:
|
||||
name: Ubuntu 20.04 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: ubuntu-20.04-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
ubuntu-2204-ci-deps:
|
||||
name: Ubuntu 22.04 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: x86_64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13
|
||||
|
||||
ubuntu-2204-arm64-ci-deps:
|
||||
name: Ubuntu 22.04 Arm64 Deps
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04-arm64
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
@ -894,43 +318,11 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- publish-repositories
|
||||
- almalinux-8-arm64-ci-deps
|
||||
- almalinux-8-ci-deps
|
||||
- almalinux-9-arm64-ci-deps
|
||||
- almalinux-9-ci-deps
|
||||
- amazonlinux-2-arm64-ci-deps
|
||||
- amazonlinux-2-ci-deps
|
||||
- amazonlinux-2023-arm64-ci-deps
|
||||
- amazonlinux-2023-ci-deps
|
||||
- centos-7-arm64-ci-deps
|
||||
- centos-7-ci-deps
|
||||
- centosstream-8-arm64-ci-deps
|
||||
- centosstream-8-ci-deps
|
||||
- centosstream-9-arm64-ci-deps
|
||||
- centosstream-9-ci-deps
|
||||
- debian-10-ci-deps
|
||||
- debian-11-arm64-ci-deps
|
||||
- debian-11-ci-deps
|
||||
- debian-12-arm64-ci-deps
|
||||
- debian-12-ci-deps
|
||||
- fedora-37-arm64-ci-deps
|
||||
- fedora-37-ci-deps
|
||||
- fedora-38-arm64-ci-deps
|
||||
- fedora-38-ci-deps
|
||||
- macos-12-ci-deps
|
||||
- macos-13-ci-deps
|
||||
- macos-13-xlarge-ci-deps
|
||||
- photonos-3-arm64-ci-deps
|
||||
- photonos-3-ci-deps
|
||||
- photonos-4-arm64-ci-deps
|
||||
- photonos-4-ci-deps
|
||||
- photonos-5-arm64-ci-deps
|
||||
- photonos-5-ci-deps
|
||||
- ubuntu-2004-arm64-ci-deps
|
||||
- ubuntu-2004-ci-deps
|
||||
- ubuntu-2204-arm64-ci-deps
|
||||
- ubuntu-2204-ci-deps
|
||||
- windows-2022-ci-deps
|
||||
- linux-arm64-ci-deps
|
||||
- linux-x86_64-ci-deps
|
||||
- macos-arm64-ci-deps
|
||||
- macos-x86_64-ci-deps
|
||||
- windows-amd64-ci-deps
|
||||
- download-onedir-artifact
|
||||
uses: ./.github/workflows/test-package-downloads-action.yml
|
||||
with:
|
||||
|
@ -1122,47 +514,11 @@ jobs:
|
|||
- pkg-download-tests
|
||||
- release
|
||||
- publish-pypi
|
||||
- windows-2016-ci-deps
|
||||
- windows-2019-ci-deps
|
||||
- windows-2022-ci-deps
|
||||
- macos-12-ci-deps
|
||||
- macos-13-ci-deps
|
||||
- macos-13-xlarge-ci-deps
|
||||
- almalinux-8-ci-deps
|
||||
- almalinux-8-arm64-ci-deps
|
||||
- almalinux-9-ci-deps
|
||||
- almalinux-9-arm64-ci-deps
|
||||
- amazonlinux-2-ci-deps
|
||||
- amazonlinux-2-arm64-ci-deps
|
||||
- amazonlinux-2023-ci-deps
|
||||
- amazonlinux-2023-arm64-ci-deps
|
||||
- archlinux-lts-ci-deps
|
||||
- centos-7-ci-deps
|
||||
- centos-7-arm64-ci-deps
|
||||
- centosstream-8-ci-deps
|
||||
- centosstream-8-arm64-ci-deps
|
||||
- centosstream-9-ci-deps
|
||||
- centosstream-9-arm64-ci-deps
|
||||
- debian-10-ci-deps
|
||||
- debian-11-ci-deps
|
||||
- debian-11-arm64-ci-deps
|
||||
- debian-12-ci-deps
|
||||
- debian-12-arm64-ci-deps
|
||||
- fedora-37-ci-deps
|
||||
- fedora-37-arm64-ci-deps
|
||||
- fedora-38-ci-deps
|
||||
- fedora-38-arm64-ci-deps
|
||||
- opensuse-15-ci-deps
|
||||
- photonos-3-ci-deps
|
||||
- photonos-3-arm64-ci-deps
|
||||
- photonos-4-ci-deps
|
||||
- photonos-4-arm64-ci-deps
|
||||
- photonos-5-ci-deps
|
||||
- photonos-5-arm64-ci-deps
|
||||
- ubuntu-2004-ci-deps
|
||||
- ubuntu-2004-arm64-ci-deps
|
||||
- ubuntu-2204-ci-deps
|
||||
- ubuntu-2204-arm64-ci-deps
|
||||
- windows-amd64-ci-deps
|
||||
- macos-x86_64-ci-deps
|
||||
- macos-arm64-ci-deps
|
||||
- linux-x86_64-ci-deps
|
||||
- linux-arm64-ci-deps
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
|
|
1028
.github/workflows/scheduled.yml
vendored
1028
.github/workflows/scheduled.yml
vendored
File diff suppressed because it is too large
Load diff
1024
.github/workflows/staging.yml
vendored
1024
.github/workflows/staging.yml
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
|||
|
||||
<%- for slug, display_name, arch in build_ci_deps_listing["windows"] %>
|
||||
<%- for arch, build_distro_slug in build_ci_deps_listing["windows"] %>
|
||||
|
||||
<{ slug.replace(".", "") }>-ci-deps:
|
||||
<%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %>
|
||||
name: <{ display_name }> Deps
|
||||
windows-<{ arch }>-ci-deps:
|
||||
<%- do test_salt_needs.append("windows-" + arch + "-ci-deps") %>
|
||||
name: Windows <{ arch }> CI Deps
|
||||
<%- if workflow_slug != 'release' %>
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
<%- endif %>
|
||||
|
@ -14,12 +14,12 @@
|
|||
<%- else %>
|
||||
- download-onedir-artifact
|
||||
<%- endif %>
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
uses: ./.github/workflows/build-deps-ci-action-windows.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
distro-slug: <{ build_distro_slug }>
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
arch: <{ arch }>
|
||||
nox-version: <{ nox_version }>
|
||||
python-version: "<{ gh_actions_workflows_python_version }>"
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
@ -28,11 +28,11 @@
|
|||
<%- endfor %>
|
||||
|
||||
|
||||
<%- for slug, display_name, arch in build_ci_deps_listing["macos"] %>
|
||||
<%- for arch, build_distro_slug in build_ci_deps_listing["macos"] %>
|
||||
|
||||
<{ slug.replace(".", "") }>-ci-deps:
|
||||
<%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %>
|
||||
name: <{ display_name }> Deps
|
||||
macos-<{ arch }>-ci-deps:
|
||||
<%- do test_salt_needs.append("macos-" + arch + "-ci-deps") %>
|
||||
name: MacOS <{ arch }> CI Deps
|
||||
<%- if workflow_slug != 'release' %>
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
|
||||
<%- endif %>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<%- endif %>
|
||||
uses: ./.github/workflows/build-deps-ci-action-macos.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
distro-slug: <{ build_distro_slug }>
|
||||
nox-session: ci-test-onedir
|
||||
platform: darwin
|
||||
arch: <{ arch }>
|
||||
|
@ -57,11 +57,11 @@
|
|||
<%- endfor %>
|
||||
|
||||
|
||||
<%- for slug, display_name, arch in build_ci_deps_listing["linux"] %>
|
||||
<%- for arch, build_distro_slug in build_ci_deps_listing["linux"] %>
|
||||
|
||||
<{ slug.replace(".", "") }>-ci-deps:
|
||||
<%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %>
|
||||
name: <{ display_name }> Deps
|
||||
linux-<{ arch }>-ci-deps:
|
||||
<%- do test_salt_needs.append("linux-" + arch + "-ci-deps") %>
|
||||
name: Linux <{ arch }> CI Deps
|
||||
<%- if workflow_slug != 'release' %>
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
<%- endif %>
|
||||
|
@ -72,9 +72,9 @@
|
|||
<%- else %>
|
||||
- download-onedir-artifact
|
||||
<%- endif %>
|
||||
uses: ./.github/workflows/build-deps-ci-action.yml
|
||||
uses: ./.github/workflows/build-deps-ci-action-linux.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
distro-slug: <{ build_distro_slug }>
|
||||
nox-session: ci-test-onedir
|
||||
platform: linux
|
||||
arch: <{ arch }>
|
||||
|
|
|
@ -94,11 +94,11 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz
|
||||
|
||||
- name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ matrix.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.linux.${{ matrix.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
@ -342,11 +342,11 @@ jobs:
|
|||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
||||
- name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ matrix.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.macos.${{ matrix.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
@ -354,7 +354,7 @@ jobs:
|
|||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- ${{ matrix.distro-slug }}
|
||||
nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }}
|
||||
|
||||
- name: Show System Info & Test Plan
|
||||
env:
|
||||
|
@ -545,11 +545,11 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz
|
||||
|
||||
- name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ matrix.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.windows.${{ matrix.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-<{ pkg_type }>-pkgs-onedir
|
||||
- <{ slug.replace(".", "") }>-ci-deps
|
||||
uses: ./.github/workflows/test-packages-action.yml
|
||||
- linux-<{ arch }>-ci-deps
|
||||
uses: ./.github/workflows/test-packages-action-linux.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -41,7 +41,7 @@
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-macos-pkgs-onedir
|
||||
- <{ slug.replace(".", "") }>-ci-deps
|
||||
- macos-<{ arch }>-ci-deps
|
||||
uses: ./.github/workflows/test-packages-action-macos.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
|
@ -71,8 +71,8 @@
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-windows-pkgs-onedir
|
||||
- <{ slug.replace(".", "") }>-ci-deps
|
||||
uses: ./.github/workflows/test-packages-action.yml
|
||||
- windows-<{ arch }>-ci-deps
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
nox-session: ci-test-onedir
|
||||
|
|
10
.github/workflows/templates/test-salt.yml.jinja
vendored
10
.github/workflows/templates/test-salt.yml.jinja
vendored
|
@ -12,8 +12,8 @@
|
|||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- <{ slug.replace(".", "") }>-ci-deps
|
||||
uses: ./.github/workflows/test-action.yml
|
||||
- windows-<{ arch }>-ci-deps
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -40,7 +40,7 @@
|
|||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- <{ slug.replace(".", "") }>-ci-deps
|
||||
- macos-<{ arch }>-ci-deps
|
||||
uses: ./.github/workflows/test-action-macos.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
|
@ -67,8 +67,8 @@
|
|||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- <{ slug.replace(".", "") }>-ci-deps
|
||||
uses: ./.github/workflows/test-action.yml
|
||||
- linux-<{ arch }>-ci-deps
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: <{ slug }>
|
||||
nox-session: ci-test-onedir
|
||||
|
|
|
@ -155,11 +155,11 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{
|
||||
path: nox.linux.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
8
.github/workflows/test-action-macos.yml
vendored
8
.github/workflows/test-action-macos.yml
vendored
|
@ -145,11 +145,11 @@ jobs:
|
|||
run: |
|
||||
brew install tree
|
||||
|
||||
- name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{
|
||||
path: nox.macos.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
@ -166,7 +166,7 @@ jobs:
|
|||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- ${{ inputs.distro-slug }}
|
||||
nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }}
|
||||
|
||||
- name: Download testrun-changed-files.txt
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
|
|
399
.github/workflows/test-action-windows.yml
vendored
Normal file
399
.github/workflows/test-action-windows.yml
vendored
Normal file
|
@ -0,0 +1,399 @@
|
|||
---
|
||||
name: Test Artifact
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
required: true
|
||||
type: string
|
||||
description: The OS slug to run tests against
|
||||
nox-session:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox session to run
|
||||
testrun:
|
||||
required: true
|
||||
type: string
|
||||
description: JSON string containing information about what and how to run the test suite
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to running tests.
|
||||
cache-prefix:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform being tested
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.10"
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
description: The onedir package name to use
|
||||
default: salt
|
||||
skip-code-coverage:
|
||||
required: false
|
||||
type: boolean
|
||||
description: Skip code coverage
|
||||
default: false
|
||||
skip-junit-reports:
|
||||
required: false
|
||||
type: boolean
|
||||
description: Skip Publishing JUnit Reports
|
||||
default: false
|
||||
workflow-slug:
|
||||
required: false
|
||||
type: string
|
||||
description: Which workflow is running.
|
||||
default: ci
|
||||
default-timeout:
|
||||
required: false
|
||||
type: number
|
||||
description: Timeout, in minutes, for the test job(Default 360, 6 hours).
|
||||
default: 360
|
||||
|
||||
env:
|
||||
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:
|
||||
|
||||
generate-matrix:
|
||||
name: Test Matrix
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- x86_64
|
||||
outputs:
|
||||
matrix-include: ${{ steps.generate-matrix.outputs.matrix }}
|
||||
steps:
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
|
||||
- name: Generate Test Matrix
|
||||
id: generate-matrix
|
||||
run: |
|
||||
tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ fromJSON(inputs.testrun)['type'] == 'full' && '--full ' || '' }}${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }}
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- bastion
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }}
|
||||
needs:
|
||||
- generate-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }}
|
||||
env:
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
TEST_GROUP: ${{ matrix.test-group || 1 }}
|
||||
|
||||
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"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Salt Version
|
||||
run: |
|
||||
echo "${{ inputs.salt-version }}" > salt/_version.txt
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Download cached nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.windows.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: PyPi Proxy
|
||||
run: |
|
||||
sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
|
||||
- name: Download testrun-changed-files.txt
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: testrun-changed-files.txt
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
id: spin-up-vm
|
||||
env:
|
||||
TESTS_CHUNK: ${{ matrix.tests-chunk }}
|
||||
run: |
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
run: |
|
||||
tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true
|
||||
|
||||
- name: Upload Checkout To VM
|
||||
run: |
|
||||
tools --timestamps vm rsync ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Show System Info & Test Plan
|
||||
run: |
|
||||
tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Fast/Changed Tests
|
||||
id: run-fast-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] == false }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Slow/Changed Tests
|
||||
id: run-slow-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] == false }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Core/Changed Tests
|
||||
id: run-core-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] == false }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Fast Tests
|
||||
id: run-fast-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Slow Tests
|
||||
id: run-slow-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests
|
||||
|
||||
- name: Run Core Tests
|
||||
id: run-core-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests
|
||||
|
||||
- name: Run Flaky Tests
|
||||
id: run-flaky-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --flaky-jail
|
||||
|
||||
- name: Run Full Tests
|
||||
id: run-full-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }}
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
-E TEST_GROUP ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \
|
||||
--test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }}
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.spin-up-vm.outcome == 'success'
|
||||
run: |
|
||||
tools --timestamps vm combine-coverage ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Download Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always() && steps.spin-up-vm.outcome == 'success'
|
||||
run: |
|
||||
tools --timestamps vm download-artifacts ${{ inputs.distro-slug }}
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
tree -a artifacts
|
||||
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }}
|
||||
fi
|
||||
|
||||
- name: Destroy VM
|
||||
if: always()
|
||||
run: |
|
||||
tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true
|
||||
|
||||
- name: Upload Code Coverage Test Run Artifacts
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
path: |
|
||||
artifacts/coverage/
|
||||
|
||||
- name: Upload JUnit XML Test Run Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}
|
||||
path: |
|
||||
artifacts/xml-unittests-output/
|
||||
|
||||
- name: Upload Test Run Log Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}
|
||||
path: |
|
||||
artifacts/logs
|
||||
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
# always run even if the previous steps fails
|
||||
if: always() && inputs.skip-junit-reports == false && job.status != 'cancelled'
|
||||
with:
|
||||
check_name: Test Results(${{ inputs.distro-slug }}, transport=${{ matrix.transport }}, tests-chunk=${{ matrix.tests-chunk }}, group=${{ matrix.test-group || '1' }})
|
||||
report_paths: 'artifacts/xml-unittests-output/*.xml'
|
||||
annotate_only: true
|
||||
|
||||
|
||||
report:
|
||||
name: Test Reports
|
||||
if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- x86_64
|
||||
needs:
|
||||
- test
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Code Coverage Test Run Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
id: download-coverage-artifacts
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
path: artifacts/coverage/
|
||||
|
||||
- name: Show Downloaded Test Run Artifacts
|
||||
run: |
|
||||
tree -a artifacts
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
||||
- name: Create XML Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox --force-color -e create-xml-coverage-reports
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
|
||||
- name: Report Salt Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- salt
|
||||
|
||||
- name: Report Combined Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage
|
||||
|
||||
- name: Rename Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
|
||||
- name: Upload Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: all-testrun-coverage-artifacts
|
||||
path: artifacts/coverage
|
|
@ -68,66 +68,30 @@ jobs:
|
|||
- distro-slug: almalinux-8
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: almalinux-8-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: almalinux-8-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: almalinux-9
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: almalinux-9-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: almalinux-9-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: amazonlinux-2
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: amazonlinux-2-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: amazonlinux-2-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: amazonlinux-2023
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: amazonlinux-2023-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: amazonlinux-2023-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: centos-7
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: centos-7-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: centos-7-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: centosstream-8
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: centosstream-8-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: centosstream-8-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: centosstream-9
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: centosstream-9-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: centosstream-9-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: debian-10
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
|
@ -135,56 +99,35 @@ jobs:
|
|||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: debian-11-arm64
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: debian-12
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: debian-12-arm64
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: fedora-37
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: fedora-37-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: fedora-37-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: fedora-38
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: fedora-38-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: fedora-38-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-3
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-3-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-3-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-4
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-4-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-4-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-5
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-5-arm64
|
||||
arch: aarch64
|
||||
pkg-type: package
|
||||
- distro-slug: photonos-5-arm64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
|
@ -192,19 +135,19 @@ jobs:
|
|||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: ubuntu-20.04-arm64
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: ubuntu-22.04
|
||||
arch: x86_64
|
||||
pkg-type: package
|
||||
- distro-slug: ubuntu-22.04-arm64
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: ubuntu-22.04
|
||||
arch: x86_64
|
||||
pkg-type: onedir
|
||||
- distro-slug: ubuntu-22.04-arm64
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
pkg-type: onedir
|
||||
|
||||
steps:
|
||||
|
@ -230,11 +173,11 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz
|
||||
|
||||
- name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ matrix.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.linux.${{ matrix.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
@ -445,7 +388,7 @@ jobs:
|
|||
arch: arm64
|
||||
pkg-type: package
|
||||
- distro-slug: macos-13-xlarge
|
||||
arch: aarch64
|
||||
arch: arm64
|
||||
pkg-type: onedir
|
||||
|
||||
steps:
|
||||
|
@ -485,11 +428,11 @@ jobs:
|
|||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
||||
- name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ matrix.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.macos.${{ matrix.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
@ -497,7 +440,7 @@ jobs:
|
|||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- ${{ matrix.distro-slug }}
|
||||
nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }}
|
||||
|
||||
- name: Show System Info & Test Plan
|
||||
env:
|
||||
|
@ -692,11 +635,11 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz
|
||||
|
||||
- name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ matrix.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.windows.${{ matrix.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
|
|
@ -152,11 +152,11 @@ jobs:
|
|||
run: |
|
||||
tree artifacts/pkg/
|
||||
|
||||
- name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.linux.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
|
@ -154,11 +154,11 @@ jobs:
|
|||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
||||
- name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
|
||||
- name: Download cached nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
path: nox.macos.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
|
@ -166,7 +166,7 @@ jobs:
|
|||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- ${{ inputs.distro-slug }}
|
||||
nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }}
|
||||
|
||||
- name: Show System Info & Test Plan
|
||||
env:
|
||||
|
|
275
.github/workflows/test-packages-action-windows.yml
vendored
Normal file
275
.github/workflows/test-packages-action-windows.yml
vendored
Normal file
|
@ -0,0 +1,275 @@
|
|||
name: Test Artifact
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
required: true
|
||||
type: string
|
||||
description: The OS slug to run tests against
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform being tested
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
pkg-type:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version of the packages to install and test
|
||||
cache-prefix:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
testing-releases:
|
||||
required: true
|
||||
type: string
|
||||
description: A JSON list of releases to test upgrades against
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.10"
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
description: The onedir package name to use
|
||||
default: salt
|
||||
nox-session:
|
||||
required: false
|
||||
type: string
|
||||
description: The nox session to run
|
||||
default: ci-test-onedir
|
||||
skip-code-coverage:
|
||||
required: false
|
||||
type: boolean
|
||||
description: Skip code coverage
|
||||
default: false
|
||||
skip-junit-reports:
|
||||
required: false
|
||||
type: boolean
|
||||
description: Skip Publishing JUnit Reports
|
||||
default: false
|
||||
|
||||
env:
|
||||
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:
|
||||
|
||||
generate-matrix:
|
||||
name: Generate Matrix
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- x86_64
|
||||
outputs:
|
||||
pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }}
|
||||
steps:
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
|
||||
- name: Generate Package Test Matrix
|
||||
id: generate-pkg-matrix
|
||||
run: |
|
||||
tools ci pkg-matrix ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ inputs.pkg-type }} --testing-releases ${{ join(fromJSON(inputs.testing-releases), ' ') }}
|
||||
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- bastion
|
||||
timeout-minutes: 120 # 2 Hours - More than this and something is wrong
|
||||
needs:
|
||||
- generate-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }}
|
||||
|
||||
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"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ inputs.arch }}-${{ inputs.pkg-type }}
|
||||
path: artifacts/pkg/
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: List Packages
|
||||
run: |
|
||||
tree artifacts/pkg/
|
||||
|
||||
- name: Download cached nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }}
|
||||
uses: actions/cache@v3.3.1
|
||||
with:
|
||||
path: nox.windows.${{ inputs.arch }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{
|
||||
hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py')
|
||||
}}
|
||||
# If we get a cache miss here it means the dependencies step failed to save the cache
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
id: spin-up-vm
|
||||
run: |
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
run: |
|
||||
tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true
|
||||
|
||||
- name: Upload Checkout To VM
|
||||
run: |
|
||||
tools --timestamps vm rsync ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Downgrade importlib-metadata
|
||||
if: ${{ contains(fromJSON('["amazonlinux-2", "centos-7", "debian-10"]'), inputs.distro-slug) && contains(fromJSON('["upgrade-classic", "downgrade-classic"]'), matrix.tests-chunk) }}
|
||||
run: |
|
||||
# This step can go away once we stop testing classic packages upgrade/downgrades to/from 3005.x
|
||||
tools --timestamps vm ssh ${{ inputs.distro-slug }} -- "sudo python3 -m pip install -U 'importlib-metadata<=4.13.0' 'virtualenv<=20.21.1'"
|
||||
|
||||
- name: Show System Info & Test Plan
|
||||
run: |
|
||||
tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }}-pkgs ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \
|
||||
${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}}
|
||||
|
||||
- name: Run Package Tests
|
||||
run: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install ${{ matrix.fips && '--fips ' || '' }}\
|
||||
--nox-session=${{ inputs.nox-session }}-pkgs --rerun-failures ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \
|
||||
${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}}
|
||||
|
||||
- name: Download Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always() && steps.spin-up-vm.outcome == 'success'
|
||||
run: |
|
||||
tools --timestamps vm download-artifacts ${{ inputs.distro-slug }}
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
tree -a artifacts
|
||||
|
||||
- name: Destroy VM
|
||||
if: always()
|
||||
run: |
|
||||
tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true
|
||||
|
||||
- name: Upload Test Run Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ matrix.tests-chunk }}
|
||||
path: |
|
||||
artifacts
|
||||
!artifacts/pkg/*
|
||||
!artifacts/salt/*
|
||||
!artifacts/salt-*.tar.*
|
||||
|
||||
report:
|
||||
name: Report
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- x86_64
|
||||
if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
needs:
|
||||
- test
|
||||
- generate-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Test Run Artifacts
|
||||
id: download-test-run-artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ matrix.tests-chunk }}
|
||||
path: artifacts
|
||||
|
||||
- name: Show Test Run Artifacts
|
||||
if: always() && steps.download-test-run-artifacts.outcome == 'success'
|
||||
run: |
|
||||
tree -a artifacts
|
||||
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
# always run even if the previous steps fails
|
||||
if: always() && inputs.skip-junit-reports == false && steps.download-test-run-artifacts.outcome == 'success'
|
||||
with:
|
||||
check_name: Overall Test Results(${{ inputs.distro-slug }} ${{ matrix.tests-chunk }})
|
||||
report_paths: 'artifacts/xml-unittests-output/*.xml'
|
||||
annotate_only: true
|
59
noxfile.py
59
noxfile.py
|
@ -1223,14 +1223,29 @@ def coverage_report(session):
|
|||
def decompress_dependencies(session):
|
||||
if not session.posargs:
|
||||
session.error(
|
||||
"Please pass the distro-slug to run tests against. "
|
||||
"Check cicd/images.yml for what's available."
|
||||
"The 'decompress-dependencies' session target needs "
|
||||
"two arguments, '<platform> <arch>'."
|
||||
)
|
||||
distro_slug = session.posargs.pop(0)
|
||||
if "windows" in distro_slug:
|
||||
nox_dependencies_tarball = f"nox.{distro_slug}.tar.gz"
|
||||
try:
|
||||
platform = session.posargs.pop(0)
|
||||
arch = session.posargs.pop(0)
|
||||
if session.posargs:
|
||||
session.error(
|
||||
"The 'decompress-dependencies' session target only accepts "
|
||||
"two arguments, '<platform> <arch>'."
|
||||
)
|
||||
except IndexError:
|
||||
session.error(
|
||||
"The 'decompress-dependencies' session target needs "
|
||||
"two arguments, '<platform> <arch>'."
|
||||
)
|
||||
if platform == "windows":
|
||||
extension = "tar.gz"
|
||||
scripts_dir_name = "Scripts"
|
||||
else:
|
||||
nox_dependencies_tarball = f"nox.{distro_slug}.tar.xz"
|
||||
extension = "tar.xz"
|
||||
scripts_dir_name = "bin"
|
||||
nox_dependencies_tarball = f"nox.{platform}.{arch}.{extension}"
|
||||
nox_dependencies_tarball_path = REPO_ROOT / nox_dependencies_tarball
|
||||
if not nox_dependencies_tarball_path.exists():
|
||||
session.error(
|
||||
|
@ -1244,10 +1259,7 @@ def decompress_dependencies(session):
|
|||
|
||||
session.log("Finding broken 'python' symlinks under '.nox/' ...")
|
||||
for dirname in os.scandir(REPO_ROOT / ".nox"):
|
||||
if "windows" not in distro_slug:
|
||||
scan_path = REPO_ROOT.joinpath(".nox", dirname, "bin")
|
||||
else:
|
||||
scan_path = REPO_ROOT.joinpath(".nox", dirname, "Scripts")
|
||||
scan_path = REPO_ROOT.joinpath(".nox", dirname, scripts_dir_name)
|
||||
script_paths = {str(p): p for p in os.scandir(scan_path)}
|
||||
fixed_shebang = f"#!{scan_path / 'python'}"
|
||||
for key in sorted(script_paths):
|
||||
|
@ -1278,7 +1290,7 @@ def decompress_dependencies(session):
|
|||
continue
|
||||
if not path.is_file():
|
||||
continue
|
||||
if "windows" not in distro_slug:
|
||||
if platform != "windows":
|
||||
# Let's try to fix shebang's
|
||||
try:
|
||||
fpath = pathlib.Path(path)
|
||||
|
@ -1301,14 +1313,27 @@ def decompress_dependencies(session):
|
|||
def compress_dependencies(session):
|
||||
if not session.posargs:
|
||||
session.error(
|
||||
"Please pass the distro-slug to run tests against. "
|
||||
"Check cicd/images.yml for what's available."
|
||||
"The 'compress-dependencies' session target needs "
|
||||
"two arguments, '<platform> <arch>'."
|
||||
)
|
||||
distro_slug = session.posargs.pop(0)
|
||||
if IS_WINDOWS:
|
||||
nox_dependencies_tarball = f"nox.{distro_slug}.tar.gz"
|
||||
try:
|
||||
platform = session.posargs.pop(0)
|
||||
arch = session.posargs.pop(0)
|
||||
if session.posargs:
|
||||
session.error(
|
||||
"The 'compress-dependencies' session target only accepts "
|
||||
"two arguments, '<platform> <arch>'."
|
||||
)
|
||||
except IndexError:
|
||||
session.error(
|
||||
"The 'compress-dependencies' session target needs "
|
||||
"two arguments, '<platform> <arch>'."
|
||||
)
|
||||
if platform == "windows":
|
||||
extension = "tar.gz"
|
||||
else:
|
||||
nox_dependencies_tarball = f"nox.{distro_slug}.tar.xz"
|
||||
extension = "tar.xz"
|
||||
nox_dependencies_tarball = f"nox.{platform}.{arch}.{extension}"
|
||||
nox_dependencies_tarball_path = REPO_ROOT / nox_dependencies_tarball
|
||||
if nox_dependencies_tarball_path.exists():
|
||||
session_warn(
|
||||
|
|
|
@ -88,41 +88,41 @@ def generate_workflows(ctx: Context):
|
|||
"template": "test-package-downloads-action.yml",
|
||||
},
|
||||
}
|
||||
test_salt_listing = {
|
||||
test_salt_listing: dict[str, list[tuple[str, ...]]] = {
|
||||
"linux": [
|
||||
("almalinux-8", "Alma Linux 8", "x86_64", "no-fips"),
|
||||
("almalinux-9", "Alma Linux 9", "x86_64", "no-fips"),
|
||||
("amazonlinux-2", "Amazon Linux 2", "x86_64", "no-fips"),
|
||||
("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "aarch64", "no-fips"),
|
||||
("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "arm64", "no-fips"),
|
||||
("amazonlinux-2023", "Amazon Linux 2023", "x86_64", "no-fips"),
|
||||
("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "aarch64", "no-fips"),
|
||||
("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "arm64", "no-fips"),
|
||||
("archlinux-lts", "Arch Linux LTS", "x86_64", "no-fips"),
|
||||
("centos-7", "CentOS 7", "x86_64", "no-fips"),
|
||||
("centosstream-8", "CentOS Stream 8", "x86_64", "no-fips"),
|
||||
("centosstream-9", "CentOS Stream 9", "x86_64", "no-fips"),
|
||||
("debian-10", "Debian 10", "x86_64", "no-fips"),
|
||||
("debian-11", "Debian 11", "x86_64", "no-fips"),
|
||||
("debian-11-arm64", "Debian 11 Arm64", "aarch64", "no-fips"),
|
||||
("debian-11-arm64", "Debian 11 Arm64", "arm64", "no-fips"),
|
||||
("debian-12", "Debian 12", "x86_64", "no-fips"),
|
||||
("debian-12-arm64", "Debian 12 Arm64", "aarch64", "no-fips"),
|
||||
("debian-12-arm64", "Debian 12 Arm64", "arm64", "no-fips"),
|
||||
("fedora-37", "Fedora 37", "x86_64", "no-fips"),
|
||||
("fedora-38", "Fedora 38", "x86_64", "no-fips"),
|
||||
("opensuse-15", "Opensuse 15", "x86_64", "no-fips"),
|
||||
("photonos-3", "Photon OS 3", "x86_64", "no-fips"),
|
||||
("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64", "no-fips"),
|
||||
("photonos-3-arm64", "Photon OS 3 Arm64", "arm64", "no-fips"),
|
||||
("photonos-4", "Photon OS 4", "x86_64", "fips"),
|
||||
("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "fips"),
|
||||
("photonos-4-arm64", "Photon OS 4 Arm64", "arm64", "fips"),
|
||||
("photonos-5", "Photon OS 5", "x86_64", "fips"),
|
||||
("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64", "fips"),
|
||||
("photonos-5-arm64", "Photon OS 5 Arm64", "arm64", "fips"),
|
||||
("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "no-fips"),
|
||||
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "no-fips"),
|
||||
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "arm64", "no-fips"),
|
||||
("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "no-fips"),
|
||||
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "no-fips"),
|
||||
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "arm64", "no-fips"),
|
||||
],
|
||||
"macos": [
|
||||
("macos-12", "macOS 12", "x86_64"),
|
||||
("macos-13", "macOS 13", "x86_64"),
|
||||
("macos-13-xlarge", "macOS 13 Arm64", "aarch64"),
|
||||
("macos-13-xlarge", "macOS 13 Arm64", "arm64"),
|
||||
],
|
||||
"windows": [
|
||||
("windows-2016", "Windows 2016", "amd64"),
|
||||
|
@ -137,7 +137,7 @@ def generate_workflows(ctx: Context):
|
|||
(
|
||||
"amazonlinux-2-arm64",
|
||||
"Amazon Linux 2 Arm64",
|
||||
"aarch64",
|
||||
"arm64",
|
||||
"rpm",
|
||||
"no-fips",
|
||||
),
|
||||
|
@ -145,7 +145,7 @@ def generate_workflows(ctx: Context):
|
|||
(
|
||||
"amazonlinux-2023-arm64",
|
||||
"Amazon Linux 2023 Arm64",
|
||||
"aarch64",
|
||||
"arm64",
|
||||
"rpm",
|
||||
"no-fips",
|
||||
),
|
||||
|
@ -155,30 +155,30 @@ def generate_workflows(ctx: Context):
|
|||
(
|
||||
"centosstream-9-arm64",
|
||||
"CentOS Stream 9 Arm64",
|
||||
"aarch64",
|
||||
"arm64",
|
||||
"rpm",
|
||||
"no-fips",
|
||||
),
|
||||
("debian-10", "Debian 10", "x86_64", "deb", "no-fips"),
|
||||
("debian-11", "Debian 11", "x86_64", "deb", "no-fips"),
|
||||
("debian-11-arm64", "Debian 11 Arm64", "aarch64", "deb", "no-fips"),
|
||||
("debian-11-arm64", "Debian 11 Arm64", "arm64", "deb", "no-fips"),
|
||||
("debian-12", "Debian 12", "x86_64", "deb", "no-fips"),
|
||||
("debian-12-arm64", "Debian 12 Arm64", "aarch64", "deb", "no-fips"),
|
||||
("debian-12-arm64", "Debian 12 Arm64", "arm64", "deb", "no-fips"),
|
||||
("photonos-3", "Photon OS 3", "x86_64", "rpm", "no-fips"),
|
||||
("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64", "rpm", "no-fips"),
|
||||
("photonos-3-arm64", "Photon OS 3 Arm64", "arm64", "rpm", "no-fips"),
|
||||
("photonos-4", "Photon OS 4", "x86_64", "rpm", "fips"),
|
||||
("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "rpm", "fips"),
|
||||
("photonos-4-arm64", "Photon OS 4 Arm64", "arm64", "rpm", "fips"),
|
||||
("photonos-5", "Photon OS 5", "x86_64", "rpm", "fips"),
|
||||
("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64", "rpm", "fips"),
|
||||
("photonos-5-arm64", "Photon OS 5 Arm64", "arm64", "rpm", "fips"),
|
||||
("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "deb", "no-fips"),
|
||||
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "deb", "no-fips"),
|
||||
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "arm64", "deb", "no-fips"),
|
||||
("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "deb", "no-fips"),
|
||||
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "deb", "no-fips"),
|
||||
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "arm64", "deb", "no-fips"),
|
||||
],
|
||||
"macos": [
|
||||
("macos-12", "macOS 12", "x86_64"),
|
||||
("macos-13", "macOS 13", "x86_64"),
|
||||
("macos-13-xlarge", "macOS 13 Arm64", "aarch64"),
|
||||
("macos-13-xlarge", "macOS 13 Arm64", "arm64"),
|
||||
],
|
||||
"windows": [
|
||||
("windows-2016", "Windows 2016", "amd64"),
|
||||
|
@ -189,51 +189,15 @@ def generate_workflows(ctx: Context):
|
|||
|
||||
build_ci_deps_listing = {
|
||||
"linux": [
|
||||
("almalinux-8", "Alma Linux 8", "x86_64"),
|
||||
("almalinux-8-arm64", "Alma Linux 8 Arm64", "aarch64"),
|
||||
("almalinux-9", "Alma Linux 9", "x86_64"),
|
||||
("almalinux-9-arm64", "Alma Linux 9 Arm64", "aarch64"),
|
||||
("amazonlinux-2", "Amazon Linux 2", "x86_64"),
|
||||
("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "aarch64"),
|
||||
("amazonlinux-2023", "Amazon Linux 2023", "x86_64"),
|
||||
("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "aarch64"),
|
||||
("archlinux-lts", "Arch Linux LTS", "x86_64"),
|
||||
("centos-7", "CentOS 7", "x86_64"),
|
||||
("centos-7-arm64", "CentOS 7 Arm64", "aarch64"),
|
||||
("centosstream-8", "CentOS Stream 8", "x86_64"),
|
||||
("centosstream-8-arm64", "CentOS Stream 8 Arm64", "aarch64"),
|
||||
("centosstream-9", "CentOS Stream 9", "x86_64"),
|
||||
("centosstream-9-arm64", "CentOS Stream 9 Arm64", "aarch64"),
|
||||
("debian-10", "Debian 10", "x86_64"),
|
||||
("debian-11", "Debian 11", "x86_64"),
|
||||
("debian-11-arm64", "Debian 11 Arm64", "aarch64"),
|
||||
("debian-12", "Debian 12", "x86_64"),
|
||||
("debian-12-arm64", "Debian 12 Arm64", "aarch64"),
|
||||
("fedora-37", "Fedora 37", "x86_64"),
|
||||
("fedora-37-arm64", "Fedora 37 Arm64", "aarch64"),
|
||||
("fedora-38", "Fedora 38", "x86_64"),
|
||||
("fedora-38-arm64", "Fedora 38 Arm64", "aarch64"),
|
||||
("opensuse-15", "Opensuse 15", "x86_64"),
|
||||
("photonos-3", "Photon OS 3", "x86_64"),
|
||||
("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64"),
|
||||
("photonos-4", "Photon OS 4", "x86_64"),
|
||||
("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64"),
|
||||
("photonos-5", "Photon OS 5", "x86_64"),
|
||||
("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64"),
|
||||
("ubuntu-20.04", "Ubuntu 20.04", "x86_64"),
|
||||
("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64"),
|
||||
("ubuntu-22.04", "Ubuntu 22.04", "x86_64"),
|
||||
("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64"),
|
||||
("x86_64", "centos-7"),
|
||||
("arm64", "centos-7-arm64"),
|
||||
],
|
||||
"macos": [
|
||||
("macos-12", "macOS 12", "x86_64"),
|
||||
("macos-13", "macOS 13", "x86_64"),
|
||||
("macos-13-xlarge", "macOS 13 Arm64", "aarch64"),
|
||||
("x86_64", "macos-12"),
|
||||
("arm64", "macos-13-xlarge"),
|
||||
],
|
||||
"windows": [
|
||||
("windows-2016", "Windows 2016", "amd64"),
|
||||
("windows-2019", "Windows 2019", "amd64"),
|
||||
("windows-2022", "Windows 2022", "amd64"),
|
||||
("amd64", "windows-2022"),
|
||||
],
|
||||
}
|
||||
test_salt_pkg_downloads_listing: dict[str, list[tuple[str, str, str]]] = {
|
||||
|
@ -249,36 +213,26 @@ def generate_workflows(ctx: Context):
|
|||
"fedora",
|
||||
"photon",
|
||||
]
|
||||
for slug, display_name, arch in build_ci_deps_listing["linux"]:
|
||||
for slug, display_name, arch, fips in test_salt_listing["linux"]:
|
||||
if slug in ("archlinux-lts", "opensuse-15"):
|
||||
continue
|
||||
test_salt_pkg_downloads_listing["linux"].append((slug, arch, "package"))
|
||||
# Account for old arm64 repo paths
|
||||
if arch == "aarch64":
|
||||
for test_slug in rpm_slugs:
|
||||
if slug.startswith(test_slug):
|
||||
test_salt_pkg_downloads_listing["linux"].append(
|
||||
(slug, "arm64", "package")
|
||||
)
|
||||
break
|
||||
for slug, display_name, arch in build_ci_deps_listing["linux"][-2:]:
|
||||
for slug, display_name, arch, fips in test_salt_listing["linux"][-2:]:
|
||||
if slug in ("archlinux-lts", "opensuse-15"):
|
||||
continue
|
||||
test_salt_pkg_downloads_listing["linux"].append((slug, arch, "onedir"))
|
||||
for slug, display_name, arch in build_ci_deps_listing["macos"]:
|
||||
if arch == "aarch64":
|
||||
arch = "arm64"
|
||||
for slug, display_name, arch in test_salt_listing["macos"]:
|
||||
test_salt_pkg_downloads_listing["macos"].append((slug, arch, "package"))
|
||||
for slug, display_name, arch in build_ci_deps_listing["macos"][-1:]:
|
||||
for slug, display_name, arch in test_salt_listing["macos"][-1:]:
|
||||
test_salt_pkg_downloads_listing["macos"].append((slug, arch, "onedir"))
|
||||
for slug, display_name, arch in build_ci_deps_listing["windows"][-1:]:
|
||||
for slug, display_name, arch in test_salt_listing["windows"][-1:]:
|
||||
for pkg_type in ("nsis", "msi", "onedir"):
|
||||
test_salt_pkg_downloads_listing["windows"].append((slug, arch, pkg_type))
|
||||
|
||||
test_salt_pkg_downloads_needs_slugs = set()
|
||||
for platform in test_salt_pkg_downloads_listing:
|
||||
for slug, _, _ in test_salt_pkg_downloads_listing[platform]:
|
||||
test_salt_pkg_downloads_needs_slugs.add(f"{slug.replace('.', '')}-ci-deps")
|
||||
for _, arch, _ in test_salt_pkg_downloads_listing[platform]:
|
||||
test_salt_pkg_downloads_needs_slugs.add(f"{platform}-{arch}-ci-deps")
|
||||
|
||||
env = Environment(
|
||||
block_start_string="<%",
|
||||
|
|
|
@ -259,3 +259,24 @@ def download_file(
|
|||
if chunk:
|
||||
f.write(chunk)
|
||||
return dest
|
||||
|
||||
|
||||
def get_platform_and_arch_from_slug(slug: str) -> tuple[str, str]:
|
||||
if "windows" in slug:
|
||||
platform = "windows"
|
||||
arch = "amd64"
|
||||
elif "macos" in slug:
|
||||
platform = "macos"
|
||||
if "macos-13" in slug and "xlarge" in slug:
|
||||
arch = "arm64"
|
||||
else:
|
||||
arch = "x86_64"
|
||||
else:
|
||||
platform = "linux"
|
||||
if "arm64" in slug:
|
||||
arch = "arm64"
|
||||
elif "aarch64" in slug:
|
||||
arch = "arm64"
|
||||
else:
|
||||
arch = "x86_64"
|
||||
return platform, arch
|
||||
|
|
12
tools/vm.py
12
tools/vm.py
|
@ -1468,15 +1468,17 @@ class VM:
|
|||
"""
|
||||
Compress .nox/ into nox.<vm-name>.tar.* in the VM
|
||||
"""
|
||||
return self.run_nox("compress-dependencies", session_args=[self.name])
|
||||
platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name)
|
||||
return self.run_nox("compress-dependencies", session_args=[platform, arch])
|
||||
|
||||
def decompress_dependencies(self):
|
||||
"""
|
||||
Decompress nox.<vm-name>.tar.* if it exists in the VM
|
||||
"""
|
||||
env = {"DELETE_NOX_ARCHIVE": "1"}
|
||||
platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name)
|
||||
return self.run_nox(
|
||||
"decompress-dependencies", session_args=[self.name], env=env
|
||||
"decompress-dependencies", session_args=[platform, arch], env=env
|
||||
)
|
||||
|
||||
def download_dependencies(self):
|
||||
|
@ -1484,9 +1486,11 @@ class VM:
|
|||
Download nox.<vm-name>.tar.* from VM
|
||||
"""
|
||||
if self.is_windows:
|
||||
dependencies_filename = f"nox.{self.name}.tar.gz"
|
||||
extension = "tar.gz"
|
||||
else:
|
||||
dependencies_filename = f"nox.{self.name}.tar.xz"
|
||||
extension = "tar.xz"
|
||||
platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name)
|
||||
dependencies_filename = f"nox.{platform}.{arch}.{extension}"
|
||||
remote_path = self.upload_path.joinpath(dependencies_filename).as_posix()
|
||||
if self.is_windows:
|
||||
for drive in ("c:", "C:"):
|
||||
|
|
Loading…
Add table
Reference in a new issue