diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index f37fdbea9699..b651ab58f18a 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,14 +1,5 @@ self-hosted-runner: # Labels of self-hosted runner in array of string labels: - - bastion - - x86_64 - - arm64 - - aarch64 - - amd64 - - repo-nightly - - repo-staging - - repo-release - - medium - - large - - macos-13-xlarge + - linux-x86_64 + - linux-arm64 diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 020b9d1e6b85..b8bea242cf06 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -26,10 +26,6 @@ inputs: description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache' default: 'false' required: false - save-always: - description: 'Run the post step to save the cache even if another step before fails' - default: 'false' - required: false outputs: cache-hit: @@ -49,7 +45,6 @@ runs: echo "GHA_CACHE_ENABLE_CROSS_OS_ARCHIVE=${{ inputs.enableCrossOsArchive }}" | tee -a "${GITHUB_ENV}" echo "GHA_CACHE_FAIL_ON_CACHE_MISS=${{ inputs.fail-on-cache-miss }}" | tee -a "${GITHUB_ENV}" echo "GHA_CACHE_LOOKUP_ONLY=${{ inputs.lookup-only }}" | tee -a "${GITHUB_ENV}" - echo "GHA_CACHE_SAVE_ALWAYS=${{ inputs.save-always }}" | tee -a "${GITHUB_ENV}" echo "GHA_CACHE_RESTORE_KEYS=${{ inputs.restore-keys }}" | tee -a "${GITHUB_ENV}" echo "GHA_CACHE_UPLOAD_CHUNK_SIZE=${{ inputs.upload-chunk-size }}" | tee -a "${GITHUB_ENV}" @@ -63,7 +58,6 @@ runs: enableCrossOsArchive: ${{ env.GHA_CACHE_ENABLE_CROSS_OS_ARCHIVE }} fail-on-cache-miss: ${{ env.GHA_CACHE_FAIL_ON_CACHE_MISS }} lookup-only: ${{ env.GHA_CACHE_LOOKUP_ONLY }} - save-always: ${{ env.GHA_CACHE_SAVE_ALWAYS }} restore-keys: ${{ env.GHA_CACHE_RESTORE_KEYS }} upload-chunk-size: ${{ env.GHA_CACHE_UPLOAD_CHUNK_SIZE }} @@ -97,7 +91,6 @@ runs: enableCrossOsArchive: ${{ env.GHA_CACHE_ENABLE_CROSS_OS_ARCHIVE }} fail-on-cache-miss: ${{ env.GHA_CACHE_FAIL_ON_CACHE_MISS }} lookup-only: ${{ env.GHA_CACHE_LOOKUP_ONLY }} - save-always: ${{ env.GHA_CACHE_SAVE_ALWAYS }} restore-keys: ${{ env.GHA_CACHE_RESTORE_KEYS }} upload-chunk-size: ${{ env.GHA_CACHE_UPLOAD_CHUNK_SIZE }} diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 577f7c55c84b..b3663e8350eb 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -34,6 +34,10 @@ on: type: string description: The onedir package name to use default: salt + matrix: + required: true + type: string + description: Json job matrix config env: @@ -48,54 +52,21 @@ env: jobs: - generate-matrix: - name: Generate Matrix - runs-on: ubuntu-latest - outputs: - matrix-include: ${{ steps.generate-matrix.outputs.matrix }} - env: - PIP_INDEX_URL: https://pypi.org/simple - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - 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 }} - env: - PIP_INDEX_URL: https://pypi.org/simple - - - name: Generate Test Matrix - id: generate-matrix - run: | - tools ci deps-matrix - - linux-dependencies: name: Linux - needs: - - generate-matrix runs-on: - - self-hosted - - linux - - bastion + - ${{ matrix.arch == 'x86_64' && 'ubuntu-latest' || 'linux-arm64' }} env: - USE_S3_CACHE: 'true' + USE_S3_CACHE: 'false' timeout-minutes: 90 strategy: fail-fast: false matrix: - include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include)['linux'] }} + include: ${{ fromJSON(inputs.matrix)['linux'] }} steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.10' - name: "Throttle Builds" shell: bash @@ -138,53 +109,33 @@ jobs: 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 ${{ matrix.distro-slug }} - - - name: List Free Space + - name: Install System Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + echo true - - name: Upload Checkout To VM + - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm rsync ${{ matrix.distro-slug }} + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + nox --install-only -e ${{ inputs.nox-session }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + nox --force-color -e "pre-archive-cleanup(pkg=False)" - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} - - - name: Download Compressed .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} - - - name: Destroy VM - if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + nox --force-color -e compress-dependencies -- linux ${{ matrix.arch }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v4 @@ -194,14 +145,12 @@ jobs: macos-dependencies: name: MacOS - needs: - - generate-matrix - runs-on: ${{ matrix.distro-slug == 'macos-13-arm64' && 'macos-13-xlarge' || matrix.distro-slug }} + runs-on: ${{ matrix.arch == 'x86_64' && 'macos-13' || 'macos-14' }} timeout-minutes: 90 strategy: fail-fast: false matrix: - include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include)['macos'] }} + include: ${{ fromJSON(inputs.matrix)['macos'] }} env: PIP_INDEX_URL: https://pypi.org/simple steps: @@ -280,21 +229,18 @@ jobs: name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} path: nox.macos.${{ matrix.arch }}.tar.* + windows-dependencies: - needs: - - generate-matrix name: Windows - runs-on: - - self-hosted - - linux - - bastion + runs-on: windows-latest env: - USE_S3_CACHE: 'true' + USE_S3_CACHE: 'false' + GITHUB_WORKSPACE: 'C:\Windows\Temp\testing' timeout-minutes: 90 strategy: fail-fast: false matrix: - include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include)['windows'] }} + include: ${{ fromJSON(inputs.matrix)['windows'] }} steps: - name: "Throttle Builds" @@ -327,10 +273,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: PyPi Proxy + - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - sed -i '7s;^;--index-url=${{ vars.PIP_INDEX_URL }} --trusted-host ${{ vars.PIP_TRUSTED_HOST }} --extra-index-url=${{ vars.PIP_EXTRA_INDEX_URL }}\n;' requirements/static/ci/*/*.txt + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" - name: Setup Python Tools Scripts if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -338,53 +285,33 @@ jobs: 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 ${{ matrix.distro-slug }} - - - name: List Free Space + - name: Install System Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + echo true - - name: Upload Checkout To VM + - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm rsync ${{ matrix.distro-slug }} + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + nox --install-only -e ${{ inputs.nox-session }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + nox --force-color -e "pre-archive-cleanup(pkg=False)" - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} - - - name: Download Compressed .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} - - - name: Destroy VM - if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + nox --force-color -e compress-dependencies -- windows ${{ matrix.arch }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build-deps-onedir.yml b/.github/workflows/build-deps-onedir.yml index 1502f662d1a2..5ee054ba79ba 100644 --- a/.github/workflows/build-deps-onedir.yml +++ b/.github/workflows/build-deps-onedir.yml @@ -8,12 +8,6 @@ on: type: string required: true description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true cache-seed: required: true type: string @@ -26,6 +20,10 @@ on: required: true type: string description: The version of python to use with relenv + matrix: + required: true + type: string + description: Json job matrix config env: RELENV_DATA: "${{ github.workspace }}/.relenv" @@ -41,19 +39,14 @@ jobs: build-deps-linux: name: Linux - if: ${{ inputs.self-hosted-runners }} + runs-on: + - ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }} strategy: fail-fast: false matrix: - arch: - - x86_64 - - arm64 - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} + include: ${{ fromJSON(inputs.matrix)['linux'] }} env: - USE_S3_CACHE: 'true' + USE_S3_CACHE: 'false' steps: - name: "Throttle Builds" @@ -88,19 +81,22 @@ jobs: build-deps-macos: name: macOS - if: ${{ inputs.github-hosted-runners }} strategy: fail-fast: false max-parallel: 2 matrix: - arch: ${{ github.event.repository.fork && fromJSON('["x86_64"]') || fromJSON('["x86_64", "arm64"]') }} + include: ${{ fromJSON(inputs.matrix)['macos'] }} runs-on: - - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} + - ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-13' }} env: USE_S3_CACHE: 'false' PIP_INDEX_URL: https://pypi.org/simple steps: + - name: "Check cores" + shell: bash + run: sysctl -n hw.ncpu + - name: "Throttle Builds" shell: bash run: | @@ -138,14 +134,11 @@ jobs: build-deps-windows: name: Windows - if: ${{ inputs.github-hosted-runners }} strategy: fail-fast: false max-parallel: 2 matrix: - arch: - - x86 - - amd64 + include: ${{ fromJSON(inputs.matrix)['windows'] }} runs-on: windows-latest env: USE_S3_CACHE: 'false' diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 88c244d3a54f..3372769516a8 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -24,15 +24,15 @@ jobs: build: name: Build runs-on: - - ubuntu-latest + - ubuntu-22.04 strategy: fail-fast: false matrix: docs-output: - - linkcheck - - spellcheck + # XXX re-enable lintcheck and spellcheck then fix the errors + # - linkcheck + # - spellcheck - html - # - pdf steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 06cf4d5337fa..abf17b5b754e 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -36,6 +36,10 @@ on: required: true type: string description: Seed used to invalidate caches + matrix: + required: true + type: string + description: Json job matrix config env: COLUMNS: 190 @@ -46,136 +50,14 @@ env: jobs: - build-macos-pkgs: - name: macOS - environment: ${{ inputs.environment }} - strategy: - fail-fast: false - matrix: - arch: ${{ github.event.repository.fork && fromJSON('["x86_64"]') || fromJSON('["x86_64", "arm64"]') }} - source: - - ${{ inputs.source }} - env: - PIP_INDEX_URL: https://pypi.org/simple - runs-on: - - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - name: Check Package Signing Enabled - shell: bash - id: check-pkg-sign - run: | - if [ "${{ inputs.sign-macos-packages }}" == "true" ]; then - if [ "${{ (secrets.MAC_SIGN_APPLE_ACCT != '' && contains(fromJSON('["nightly", "staging"]'), inputs.environment)) && 'true' || 'false' }}" != "true" ]; then - MSG="Secrets for signing packages are not available. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - else - MSG="The packages created WILL be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" - fi - else - MSG="The sign-macos-packages input is false. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - fi - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v4 - with: - name: salt-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - path: artifacts/ - - - name: Prepare Package Signing - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - run: | - echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12 - echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12 - # Create SaltSigning keychain. This will contain the certificates for signing - security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" - # Append SaltSigning keychain to the search list - security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)" - # Unlock the keychain so we can import certs - security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" - # Developer Application Certificate - security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A - rm app-cert.p12 - # Developer Installer Certificate - security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A - rm install-cert.p12 - security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null - - - name: Build MacOS Package - env: - DEV_APP_CERT: "${{ secrets.MAC_SIGN_DEV_APP_CERT }}" - DEV_INSTALL_CERT: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT }}" - APPLE_ACCT: "${{ secrets.MAC_SIGN_APPLE_ACCT }}" - APPLE_TEAM_ID: "${{ secrets.MAC_SIGN_APPLE_TEAM_ID }}" - APP_SPEC_PWD: "${{ secrets.MAC_SIGN_APP_SPEC_PWD }}" - run: | - tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format( - '--onedir salt-{0}-onedir-macos-{1}.tar.xz --salt-version {0} {2}', - inputs.salt-version, - matrix.arch, - steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' - ) - || - format('--salt-version {0}', inputs.salt-version) - }} - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload ${{ matrix.arch }} Package - uses: actions/upload-artifact@v4 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: pkg/macos/salt-${{ inputs.salt-version }}-py3-*.pkg - retention-days: 7 - if-no-files-found: error - build-deb-packages: name: DEB runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} + - ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }} strategy: fail-fast: false matrix: - arch: - - x86_64 - - arm64 - source: - - ${{ inputs.source }} + include: ${{ fromJSON(inputs.matrix)['linux'] }} container: image: ghcr.io/saltstack/salt-ci-containers/packaging:debian-12 @@ -263,17 +145,13 @@ jobs: build-rpm-packages: name: RPM runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} + - ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }} strategy: fail-fast: false matrix: - arch: - - x86_64 - - arm64 source: - ${{ inputs.source }} + include: ${{ fromJSON(inputs.matrix)['linux'] }} container: image: ghcr.io/saltstack/salt-ci-containers/packaging:rockylinux-9 @@ -340,6 +218,120 @@ jobs: retention-days: 7 if-no-files-found: error + build-macos-pkgs: + name: macOS + environment: ${{ inputs.environment }} + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['macos'] }} + env: + PIP_INDEX_URL: https://pypi.org/simple + runs-on: + - ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-13' }} + + steps: + - name: Check Package Signing Enabled + shell: bash + id: check-pkg-sign + run: | + if [ "${{ inputs.sign-macos-packages }}" == "true" ]; then + if [ "${{ (secrets.MAC_SIGN_APPLE_ACCT != '' && contains(fromJSON('["nightly", "staging"]'), inputs.environment)) && 'true' || 'false' }}" != "true" ]; then + MSG="Secrets for signing packages are not available. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + else + MSG="The packages created WILL be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" + fi + else + MSG="The sign-macos-packages input is false. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + fi + + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v4 + with: + name: salt-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Prepare Package Signing + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + run: | + echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12 + echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12 + # Create SaltSigning keychain. This will contain the certificates for signing + security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" + # Append SaltSigning keychain to the search list + security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)" + # Unlock the keychain so we can import certs + security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" + # Developer Application Certificate + security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A + rm app-cert.p12 + # Developer Installer Certificate + security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A + rm install-cert.p12 + security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null + + - name: Build MacOS Package + env: + DEV_APP_CERT: "${{ secrets.MAC_SIGN_DEV_APP_CERT }}" + DEV_INSTALL_CERT: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT }}" + APPLE_ACCT: "${{ secrets.MAC_SIGN_APPLE_ACCT }}" + APPLE_TEAM_ID: "${{ secrets.MAC_SIGN_APPLE_TEAM_ID }}" + APP_SPEC_PWD: "${{ secrets.MAC_SIGN_APP_SPEC_PWD }}" + run: | + tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format( + '--onedir salt-{0}-onedir-macos-{1}.tar.xz --salt-version {0} {2}', + inputs.salt-version, + matrix.arch, + steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' + ) + || + format('--salt-version {0}', inputs.salt-version) + }} + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload ${{ matrix.arch }} Package + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: pkg/macos/salt-${{ inputs.salt-version }}-py3-*.pkg + retention-days: 7 + if-no-files-found: error + build-windows-pkgs: name: Windows environment: ${{ inputs.environment }} @@ -347,12 +339,7 @@ jobs: fail-fast: false max-parallel: 2 matrix: - arch: - - x86 - - amd64 - source: - - ${{ inputs.source }} - + include: ${{ fromJSON(inputs.matrix)['windows'] }} runs-on: - windows-latest env: diff --git a/.github/workflows/build-salt-onedir.yml b/.github/workflows/build-salt-onedir.yml index 5913038bbd21..c26b21b83ede 100644 --- a/.github/workflows/build-salt-onedir.yml +++ b/.github/workflows/build-salt-onedir.yml @@ -8,12 +8,6 @@ on: type: string required: true description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true cache-seed: required: true type: string @@ -26,6 +20,10 @@ on: required: true type: string description: The version of python to use with relenv + matrix: + type: string + required: true + description: Json config for build matrix env: RELENV_DATA: "${{ github.workspace }}/.relenv" @@ -39,21 +37,17 @@ env: jobs: + build-salt-linux: name: Linux - if: ${{ inputs.self-hosted-runners }} env: - USE_S3_CACHE: 'true' + USE_S3_CACHE: 'false' + runs-on: + - ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }} strategy: fail-fast: false matrix: - arch: - - x86_64 - - arm64 - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} + include: ${{ fromJSON(inputs.matrix)['linux'] }} steps: - name: "Throttle Builds" @@ -95,18 +89,21 @@ jobs: build-salt-macos: name: macOS - if: ${{ inputs.github-hosted-runners }} strategy: fail-fast: false max-parallel: 2 matrix: - arch: ${{ github.event.repository.fork && fromJSON('["x86_64"]') || fromJSON('["x86_64", "arm64"]') }} + include: ${{ fromJSON(inputs.matrix)['macos'] }} runs-on: - - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} + - ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-13' }} env: PIP_INDEX_URL: https://pypi.org/simple steps: + - name: "Check cores" + shell: bash + run: sysctl -n hw.ncpu + - name: "Throttle Builds" shell: bash run: | @@ -150,14 +147,11 @@ jobs: build-salt-windows: name: Windows - if: ${{ inputs.github-hosted-runners }} strategy: fail-fast: false max-parallel: 2 matrix: - arch: - - x86 - - amd64 + include: ${{ fromJSON(inputs.matrix)['windows'] }} runs-on: windows-latest env: PIP_INDEX_URL: https://pypi.org/simple diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1bbf26343fa..4ad401cb3b31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-2 # Bump the number to invalidate all caches + CACHE_SEED: SEED-1 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" PIP_DISABLE_PIP_VERSION_CHECK: "1" RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" @@ -38,13 +38,10 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} - runners: ${{ steps.runner-types.outputs.runners }} changed-files: ${{ steps.process-changed-files.outputs.changed-files }} - os-labels: ${{ steps.get-pull-labels.outputs.os-labels }} - pull-labels: ${{ steps.get-pull-labels.outputs.test-labels }} testrun: ${{ steps.define-testrun.outputs.testrun }} salt-version: ${{ steps.setup-salt-version.outputs.salt-version }} cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} @@ -52,6 +49,7 @@ jobs: releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -164,14 +162,6 @@ jobs: salt-version: "" validate-version: true - - name: Get Pull Request Test Labels - id: get-pull-labels - if: ${{ github.event_name == 'pull_request'}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - tools ci get-pr-test-labels --repository ${{ github.repository }} - - name: Get Hash For Nox Tarball Cache id: nox-archive-hash run: | @@ -196,11 +186,6 @@ jobs: run: | echo '${{ steps.process-changed-files.outputs.changed-files }}' | jq -C '.' - - name: Define Runner Types - id: runner-types - run: | - tools ci runner-types ${{ github.event_name }} - - name: Define Jobs To Run id: define-jobs run: | @@ -225,6 +210,11 @@ jobs: run: | tools ci define-testrun ${{ github.event_name }} changed-files.json + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + - name: Check Contents of generated testrun-changed-files.txt if: ${{ fromJSON(steps.define-testrun.outputs.testrun)['type'] != 'full' }} run: | @@ -240,7 +230,6 @@ jobs: pre-commit: name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow @@ -251,7 +240,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -259,7 +248,6 @@ jobs: changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} nsis-tests: name: NSIS Tests - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/nsis-tests.yml needs: - prepare-workflow @@ -268,8 +256,9 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ubuntu-latest + runs-on: + - ubuntu-22.04 + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -376,7 +365,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -387,11 +376,11 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -417,22 +406,21 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" build-deps-onedir: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + name: Build Onedir Dependencies + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -441,14 +429,13 @@ jobs: with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-pkgs-onedir: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -456,26 +443,13 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" source: "onedir" - - build-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir - uses: ./.github/workflows/build-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" - python-version: "3.10.15" - source: "src" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-ci-deps: name: CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] }} needs: - prepare-workflow - build-salt-onedir @@ -487,1513 +461,52 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" - - rockylinux-8-pkg-tests: - name: Rocky Linux 8 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'rockylinux-8') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-8-arm64-pkg-tests: - name: Rocky Linux 8 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'rockylinux-8-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-pkg-tests: - name: Rocky Linux 9 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-arm64-pkg-tests: - name: Rocky Linux 9 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'rockylinux-9-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2-pkg-tests: - name: Amazon Linux 2 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'amazonlinux-2') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2-arm64-pkg-tests: - name: Amazon Linux 2 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'amazonlinux-2-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2023-pkg-tests: - name: Amazon Linux 2023 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'amazonlinux-2023') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2023-arm64-pkg-tests: - name: Amazon Linux 2023 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-11-pkg-tests: - name: Debian 11 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-11') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-11-arm64-pkg-tests: - name: Debian 11 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-11-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-12-pkg-tests: - name: Debian 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-12') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-12-arm64-pkg-tests: - name: Debian 12 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-12-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-pkg-tests: - name: Photon OS 4 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-arm64-pkg-tests: - name: Photon OS 4 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-pkg-tests-fips: - name: Photon OS 4 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-4-arm64-pkg-tests-fips: - name: Photon OS 4 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-pkg-tests: - name: Photon OS 5 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-5') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-arm64-pkg-tests: - name: Photon OS 5 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} + test-packages: + name: Test Package + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test-pkg'] }} needs: - prepare-workflow - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-packages-action.yml with: - distro-slug: photonos-5-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-pkg-tests-fips: - name: Photon OS 5 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-5') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-arm64-pkg-tests-fips: - name: Photon OS 5 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }} + test: + name: Test Salt + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test'] }} needs: - prepare-workflow - - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-action.yml with: - distro-slug: photonos-5-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - ubuntu-2004-pkg-tests: - name: Ubuntu 20.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-20.04') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2004-arm64-pkg-tests: - name: Ubuntu 20.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-20.04-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-pkg-tests: - name: Ubuntu 22.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-22.04') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-arm64-pkg-tests: - name: Ubuntu 22.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-22.04-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-pkg-tests: - name: Ubuntu 24.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-24.04') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-arm64-pkg-tests: - name: Ubuntu 24.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-12-pkg-tests: - name: macOS 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-pkg-tests: - name: macOS 13 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'macos-13') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-arm64-pkg-tests: - name: macOS 13 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'macos-13-arm64') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-nsis-pkg-tests: - name: Windows 2016 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2016') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-msi-pkg-tests: - name: Windows 2016 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2016') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-nsis-pkg-tests: - name: Windows 2019 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2019') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-msi-pkg-tests: - name: Windows 2019 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2019') }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-nsis-pkg-tests: - name: Windows 2022 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-msi-pkg-tests: - name: Windows 2022 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016: - name: Windows 2016 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2016') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - windows-2019: - name: Windows 2019 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2019') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - windows-2022: - name: Windows 2022 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - macos-12: - name: macOS 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - macos-13: - name: macOS 13 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'macos-13') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - macos-13-arm64: - name: macOS 13 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'macos-13-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - rockylinux-8: - name: Rocky Linux 8 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'rockylinux-8') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - rockylinux-8-arm64: - name: Rocky Linux 8 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'rockylinux-8-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - rockylinux-9: - name: Rocky Linux 9 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - rockylinux-9-arm64: - name: Rocky Linux 9 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'rockylinux-9-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - amazonlinux-2: - name: Amazon Linux 2 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'amazonlinux-2') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - amazonlinux-2-arm64: - name: Amazon Linux 2 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'amazonlinux-2-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - amazonlinux-2023: - name: Amazon Linux 2023 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'amazonlinux-2023') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - amazonlinux-2023-arm64: - name: Amazon Linux 2023 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - debian-11: - name: Debian 11 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-11') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - debian-11-arm64: - name: Debian 11 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-11-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - debian-12: - name: Debian 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-12') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - debian-12-arm64: - name: Debian 12 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-12-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - fedora-40: - name: Fedora 40 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'fedora-40') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: fedora-40 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - opensuse-15: - name: Opensuse 15 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'opensuse-15') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - photonos-4: - name: Photon OS 4 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - photonos-4-arm64: - name: Photon OS 4 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - photonos-4-fips: - name: Photon OS 4 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - fips: true - - photonos-4-arm64-fips: - name: Photon OS 4 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-4-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - fips: true - - photonos-5: - name: Photon OS 5 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-5') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - photonos-5-arm64: - name: Photon OS 5 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - photonos-5-fips: - name: Photon OS 5 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'photonos-5') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - fips: true - - photonos-5-arm64-fips: - name: Photon OS 5 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - fips: true - - ubuntu-2004: - name: Ubuntu 20.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-20.04') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - ubuntu-2004-arm64: - name: Ubuntu 20.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-20.04-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - ubuntu-2204: - name: Ubuntu 22.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-22.04') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - ubuntu-2204-arm64: - name: Ubuntu 22.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-22.04-arm64') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - ubuntu-2404: - name: Ubuntu 24.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'ubuntu-24.04') }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} - workflow-slug: ci - default-timeout: 180 - - ubuntu-2404-arm64: - name: Ubuntu 24.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} workflow-slug: ci default-timeout: 180 + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }} combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: PIP_INDEX_URL: https://pypi.org/simple needs: - prepare-workflow - build-ci-deps - - windows-2016 - - windows-2019 - - windows-2022 - - macos-12 - - macos-13 - - macos-13-arm64 - - rockylinux-8 - - rockylinux-8-arm64 - - rockylinux-9 - - rockylinux-9-arm64 - - amazonlinux-2 - - amazonlinux-2-arm64 - - amazonlinux-2023 - - amazonlinux-2023-arm64 - - debian-11 - - debian-11-arm64 - - debian-12 - - debian-12-arm64 - - fedora-40 - - opensuse-15 - - photonos-4 - - photonos-4-arm64 - - photonos-4-fips - - photonos-4-arm64-fips - - photonos-5 - - photonos-5-arm64 - - photonos-5-fips - - photonos-5-arm64-fips - - ubuntu-2004 - - ubuntu-2004-arm64 - - ubuntu-2204 - - ubuntu-2204-arm64 - - ubuntu-2404 - - ubuntu-2404-arm64 steps: - uses: actions/checkout@v4 @@ -2119,7 +632,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - prepare-workflow - pre-commit @@ -2128,78 +641,8 @@ jobs: - build-docs - build-deps-onedir - build-salt-onedir - - build-pkgs-src - combine-all-code-coverage - build-ci-deps - - windows-2016 - - windows-2019 - - windows-2022 - - macos-12 - - macos-13 - - macos-13-arm64 - - rockylinux-8 - - rockylinux-8-arm64 - - rockylinux-9 - - rockylinux-9-arm64 - - amazonlinux-2 - - amazonlinux-2-arm64 - - amazonlinux-2023 - - amazonlinux-2023-arm64 - - debian-11 - - debian-11-arm64 - - debian-12 - - debian-12-arm64 - - fedora-40 - - opensuse-15 - - photonos-4 - - photonos-4-arm64 - - photonos-4-fips - - photonos-4-arm64-fips - - photonos-5 - - photonos-5-arm64 - - photonos-5-fips - - photonos-5-arm64-fips - - ubuntu-2004 - - ubuntu-2004-arm64 - - ubuntu-2204 - - ubuntu-2204-arm64 - - ubuntu-2404 - - ubuntu-2404-arm64 - - rockylinux-8-pkg-tests - - rockylinux-8-arm64-pkg-tests - - rockylinux-9-pkg-tests - - rockylinux-9-arm64-pkg-tests - - amazonlinux-2-pkg-tests - - amazonlinux-2-arm64-pkg-tests - - amazonlinux-2023-pkg-tests - - amazonlinux-2023-arm64-pkg-tests - - debian-11-pkg-tests - - debian-11-arm64-pkg-tests - - debian-12-pkg-tests - - debian-12-arm64-pkg-tests - - photonos-4-pkg-tests - - photonos-4-arm64-pkg-tests - - photonos-4-pkg-tests-fips - - photonos-4-arm64-pkg-tests-fips - - photonos-5-pkg-tests - - photonos-5-arm64-pkg-tests - - photonos-5-pkg-tests-fips - - photonos-5-arm64-pkg-tests-fips - - ubuntu-2004-pkg-tests - - ubuntu-2004-arm64-pkg-tests - - ubuntu-2204-pkg-tests - - ubuntu-2204-arm64-pkg-tests - - ubuntu-2404-pkg-tests - - ubuntu-2404-arm64-pkg-tests - - macos-12-pkg-tests - - macos-13-pkg-tests - - macos-13-arm64-pkg-tests - - windows-2016-nsis-pkg-tests - - windows-2016-msi-pkg-tests - - windows-2019-nsis-pkg-tests - - windows-2019-msi-pkg-tests - - windows-2022-nsis-pkg-tests - - windows-2022-msi-pkg-tests steps: - name: Get workflow information id: get-workflow-info diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml new file mode 100644 index 000000000000..0eb554be36e2 --- /dev/null +++ b/.github/workflows/draft-release.yml @@ -0,0 +1,131 @@ +--- +name: Draft Github Release + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + matrix: + required: true + type: string + description: Json job matrix config + build-matrix: + required: true + type: string + description: Json job matrix config + +env: + COLUMNS: 190 + PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} + PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} + PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} + PIP_DISABLE_PIP_VERSION_CHECK: "1" + +jobs: + + list-artifacts: + name: List Artifacts + runs-on: ubuntu-22.04 + steps: + # Checkout here so we can easily use custom actions + - uses: actions/download-artifact@v4 + with: + path: artifacts/ + - name: List Directory Structure + run: ls -R artifacts/ + + create-github-release: + name: Draft Release v${{ inputs.salt-version }} + runs-on: ubuntu-22.04 + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_name: "Release v${{ inputs.salt-version }}" + tag_name: v${{ inputs.salt-version }} + draft: true + prerelease: false + - name: Release Output + run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> "$GITHUB_OUTPUT" + + upload-source-tarball: + needs: + - create-github-release + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}.tar.gz + upload_url: ${{ needs.create-github-release.outputs.upload_url }} + + upload-onedir: + needs: + - create-github-release + strategy: + matrix: + include: ${{ fromJSON(inputs.matrix) }} + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.arch }}.${{ matrix.platform == 'windows' && 'zip' || 'tar.xz' }} + upload_url: ${{ needs.create-github-release.outputs.upload_url }} + + upload-deb-packages: + needs: + - create-github-release + strategy: + matrix: + include: ${{ fromJSON(inputs.build-matrix)['linux'] }} + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb + upload_url: ${{ needs.create-github-release.outputs.upload_url }} + + upload-rpm-packages: + needs: + - create-github-release + strategy: + matrix: + include: ${{ fromJSON(inputs.build-matrix)['linux'] }} + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm + upload_url: ${{ needs.create-github-release.outputs.upload_url }} + + upload-mac-packages: + needs: + - create-github-release + strategy: + matrix: + include: ${{ fromJSON(inputs.build-matrix)['macos'] }} + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos + upload_url: ${{ needs.create-github-release.outputs.upload_url }} + + upload-windows-msi-packages: + needs: + - create-github-release + strategy: + matrix: + include: ${{ fromJSON(inputs.build-matrix)['windows'] }} + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI + upload_url: ${{ needs.create-github-release.outputs.upload_url }} + + upload-windows-nsis-packages: + needs: + - create-github-release + strategy: + matrix: + include: ${{ fromJSON(inputs.build-matrix)['windows'] }} + uses: ./.github/workflows/release-artifact.yml + with: + name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS + upload_url: ${{ needs.create-github-release.outputs.upload_url }} diff --git a/.github/workflows/lint-action.yml b/.github/workflows/lint-action.yml index 3c3df9cfb899..09f614fbf36c 100644 --- a/.github/workflows/lint-action.yml +++ b/.github/workflows/lint-action.yml @@ -18,17 +18,13 @@ env: jobs: Salt: name: Lint Salt's Source Code - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['lint'] }} container: image: ghcr.io/saltstack/salt-ci-containers/python:3.10 steps: - - name: Install System Deps - run: | - apt-get update - apt-get install -y enchant-2 git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev - name: Add Git Safe Directory run: | @@ -62,18 +58,13 @@ jobs: Tests: name: Lint Salt's Test Suite - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['tests'] || fromJSON(inputs.changed-files)['lint'] }} container: image: ghcr.io/saltstack/salt-ci-containers/python:3.10 steps: - - name: Install System Deps - run: | - echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list - apt-get update - apt-get install -y enchant-2 git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev - name: Add Git Safe Directory run: | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 10182dac0d5f..a51d0f9d5b68 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -22,7 +22,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-2 # Bump the number to invalidate all caches + CACHE_SEED: SEED-1 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" PIP_DISABLE_PIP_VERSION_CHECK: "1" RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" @@ -40,7 +40,7 @@ jobs: workflow-requirements: name: Check Workflow Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: @@ -72,7 +72,7 @@ jobs: trigger-branch-nightly-builds: name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - workflow-requirements steps: @@ -84,16 +84,13 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }} needs: - workflow-requirements outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} - runners: ${{ steps.runner-types.outputs.runners }} changed-files: ${{ steps.process-changed-files.outputs.changed-files }} - os-labels: ${{ steps.get-pull-labels.outputs.os-labels }} - pull-labels: ${{ steps.get-pull-labels.outputs.test-labels }} testrun: ${{ steps.define-testrun.outputs.testrun }} salt-version: ${{ steps.setup-salt-version.outputs.salt-version }} cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} @@ -101,6 +98,7 @@ jobs: releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -213,14 +211,6 @@ jobs: salt-version: "" validate-version: true - - name: Get Pull Request Test Labels - id: get-pull-labels - if: ${{ github.event_name == 'pull_request'}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - tools ci get-pr-test-labels --repository ${{ github.repository }} - - name: Get Hash For Nox Tarball Cache id: nox-archive-hash run: | @@ -245,11 +235,6 @@ jobs: run: | echo '${{ steps.process-changed-files.outputs.changed-files }}' | jq -C '.' - - name: Define Runner Types - id: runner-types - run: | - tools ci runner-types ${{ github.event_name }} - - name: Define Jobs To Run id: define-jobs run: | @@ -274,6 +259,11 @@ jobs: run: | tools ci define-testrun ${{ github.event_name }} changed-files.json + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config${{ inputs.skip-salt-test-suite && ' --skip-tests' || '' }}${{ inputs.skip-salt-pkg-test-suite && ' --skip-pkg-tests' || '' }} ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + - name: Check Contents of generated testrun-changed-files.txt if: ${{ fromJSON(steps.define-testrun.outputs.testrun)['type'] != 'full' }} run: | @@ -289,7 +279,6 @@ jobs: pre-commit: name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow @@ -300,7 +289,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -308,7 +297,6 @@ jobs: changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} nsis-tests: name: NSIS Tests - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/nsis-tests.yml needs: - prepare-workflow @@ -317,8 +305,9 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ubuntu-latest + runs-on: + - ubuntu-22.04 + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -430,7 +419,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -441,11 +430,11 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -471,22 +460,21 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" build-deps-onedir: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + name: Build Onedir Dependencies + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -495,14 +483,13 @@ jobs: with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-pkgs-onedir: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -510,9 +497,10 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" source: "onedir" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} environment: nightly sign-macos-packages: false sign-windows-packages: false @@ -520,7 +508,7 @@ jobs: build-pkgs-src: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -528,16 +516,17 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" source: "src" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} environment: nightly sign-macos-packages: false sign-windows-packages: false secrets: inherit build-ci-deps: name: CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] }} needs: - prepare-workflow - build-salt-onedir @@ -549,2353 +538,62 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" - - rockylinux-8-pkg-tests: - name: Rocky Linux 8 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-8-arm64-pkg-tests: - name: Rocky Linux 8 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-pkg-tests: - name: Rocky Linux 9 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-arm64-pkg-tests: - name: Rocky Linux 9 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2-pkg-tests: - name: Amazon Linux 2 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2-arm64-pkg-tests: - name: Amazon Linux 2 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2023-pkg-tests: - name: Amazon Linux 2023 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2023-arm64-pkg-tests: - name: Amazon Linux 2023 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-11-pkg-tests: - name: Debian 11 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-11-arm64-pkg-tests: - name: Debian 11 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-12-pkg-tests: - name: Debian 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-12-arm64-pkg-tests: - name: Debian 12 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-pkg-tests: - name: Photon OS 4 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-arm64-pkg-tests: - name: Photon OS 4 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-pkg-tests-fips: - name: Photon OS 4 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} + test-packages: + name: Test Package + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test-pkg'] }} needs: - prepare-workflow - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-packages-action.yml with: - distro-slug: photonos-4 nox-session: ci-test-onedir - platform: linux - arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-4-arm64-pkg-tests-fips: - name: Photon OS 4 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-pkg-tests: - name: Photon OS 5 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-arm64-pkg-tests: - name: Photon OS 5 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }} + test: + name: Test Salt + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test'] }} needs: - prepare-workflow - - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-action.yml with: - distro-slug: photonos-5-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-pkg-tests-fips: - name: Photon OS 5 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 + testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true + workflow-slug: nightly + default-timeout: 360 + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }} - photonos-5-arm64-pkg-tests-fips: - name: Photon OS 5 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + set-pipeline-exit-status: + # This step is just so we can make github require this step, to pass checks + # on a pull request instead of requiring all + name: Set the ${{ github.workflow }} Pipeline Exit Status + if: always() + runs-on: ubuntu-22.04 + environment: nightly needs: + - workflow-requirements + - trigger-branch-nightly-builds - prepare-workflow - - build-pkgs-onedir + - pre-commit + - lint + - nsis-tests + - build-docs + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - ubuntu-2004-pkg-tests: - name: Ubuntu 20.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2004-arm64-pkg-tests: - name: Ubuntu 20.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-pkg-tests: - name: Ubuntu 22.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-arm64-pkg-tests: - name: Ubuntu 22.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-pkg-tests: - name: Ubuntu 24.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-arm64-pkg-tests: - name: Ubuntu 24.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-12-pkg-tests: - name: macOS 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-pkg-tests: - name: macOS 13 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-arm64-pkg-tests: - name: macOS 13 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-nsis-pkg-tests: - name: Windows 2016 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-msi-pkg-tests: - name: Windows 2016 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-nsis-pkg-tests: - name: Windows 2019 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-msi-pkg-tests: - name: Windows 2019 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-nsis-pkg-tests: - name: Windows 2022 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-msi-pkg-tests: - name: Windows 2022 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016: - name: Windows 2016 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - windows-2019: - name: Windows 2019 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - windows-2022: - name: Windows 2022 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - macos-12: - name: macOS 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - macos-13: - name: macOS 13 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - macos-13-arm64: - name: macOS 13 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - rockylinux-8: - name: Rocky Linux 8 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - rockylinux-8-arm64: - name: Rocky Linux 8 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - rockylinux-9: - name: Rocky Linux 9 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - rockylinux-9-arm64: - name: Rocky Linux 9 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - amazonlinux-2: - name: Amazon Linux 2 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - amazonlinux-2-arm64: - name: Amazon Linux 2 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - amazonlinux-2023: - name: Amazon Linux 2023 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - amazonlinux-2023-arm64: - name: Amazon Linux 2023 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - debian-11: - name: Debian 11 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - debian-11-arm64: - name: Debian 11 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - debian-12: - name: Debian 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - debian-12-arm64: - name: Debian 12 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - fedora-40: - name: Fedora 40 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: fedora-40 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - opensuse-15: - name: Opensuse 15 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - photonos-4: - name: Photon OS 4 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - photonos-4-arm64: - name: Photon OS 4 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - photonos-4-fips: - name: Photon OS 4 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - fips: true - - photonos-4-arm64-fips: - name: Photon OS 4 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - fips: true - - photonos-5: - name: Photon OS 5 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - photonos-5-arm64: - name: Photon OS 5 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - photonos-5-fips: - name: Photon OS 5 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - fips: true - - photonos-5-arm64-fips: - name: Photon OS 5 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - fips: true - - ubuntu-2004: - name: Ubuntu 20.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - ubuntu-2004-arm64: - name: Ubuntu 20.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - ubuntu-2204: - name: Ubuntu 22.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - ubuntu-2204-arm64: - name: Ubuntu 22.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - ubuntu-2404: - name: Ubuntu 24.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - ubuntu-2404-arm64: - name: Ubuntu 24.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: nightly - default-timeout: 360 - - build-src-repo: - name: Build Repository - environment: nightly - runs-on: - - self-hosted - - linux - - repo-nightly - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-source-tarball - - build-pkgs-src - strategy: - fail-fast: false - matrix: - pkg-type: - - src - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download Source Tarball - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create src --key-id=64CBBC8173D76B3F --nightly-build-from=${{ github.ref_name }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Copy Files For Source Only Artifact Uploads - run: | - mkdir artifacts/src - find artifacts/pkgs/repo -type f -print -exec cp {} artifacts/src \; - - - name: Upload Standalone Repository As An Artifact - uses: actions/upload-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-src-repo - path: | - artifacts/src/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - artifacts/src/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.* - artifacts/src/*-GPG-* - retention-days: 7 - if-no-files-found: error - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-src - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: src-repo - - build-deb-repo: - name: Build Repository - environment: nightly - runs-on: - - self-hosted - - linux - - repo-nightly - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - include: - - pkg-type: deb - distro: debian - version: "11" - arch: x86_64 - - pkg-type: deb - distro: debian - version: "11" - arch: arm64 - - pkg-type: deb - distro: debian - version: "12" - arch: x86_64 - - pkg-type: deb - distro: debian - version: "12" - arch: arm64 - - pkg-type: deb - distro: ubuntu - version: "20.04" - arch: x86_64 - - pkg-type: deb - distro: ubuntu - version: "20.04" - arch: arm64 - - pkg-type: deb - distro: ubuntu - version: "22.04" - arch: x86_64 - - pkg-type: deb - distro: ubuntu - version: "22.04" - arch: arm64 - - pkg-type: deb - distro: ubuntu - version: "24.04" - arch: x86_64 - - pkg-type: deb - distro: ubuntu - version: "24.04" - arch: arm64 - - steps: - - uses: actions/checkout@v4 - - - name: Download System Dependencies - run: | - sudo apt update - sudo apt install -y devscripts apt-utils - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download DEB Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-deb - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create deb --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} --nightly-build-from=${{ github.ref_name }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-${{ matrix.pkg-type }}-${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }} - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo - - build-rpm-repo: - name: Build Repository - environment: nightly - runs-on: - - self-hosted - - linux - - repo-nightly - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - include: - - pkg-type: rpm - distro: amazon - version: "2" - arch: x86_64 - - pkg-type: rpm - distro: amazon - version: "2" - arch: arm64 - - pkg-type: rpm - distro: amazon - version: "2" - arch: aarch64 - - pkg-type: rpm - distro: amazon - version: "2023" - arch: x86_64 - - pkg-type: rpm - distro: amazon - version: "2023" - arch: arm64 - - pkg-type: rpm - distro: amazon - version: "2023" - arch: aarch64 - - pkg-type: rpm - distro: fedora - version: "40" - arch: x86_64 - - pkg-type: rpm - distro: fedora - version: "40" - arch: arm64 - - pkg-type: rpm - distro: fedora - version: "40" - arch: aarch64 - - pkg-type: rpm - distro: photon - version: "4" - arch: x86_64 - - pkg-type: rpm - distro: photon - version: "4" - arch: arm64 - - pkg-type: rpm - distro: photon - version: "4" - arch: aarch64 - - pkg-type: rpm - distro: photon - version: "5" - arch: x86_64 - - pkg-type: rpm - distro: photon - version: "5" - arch: arm64 - - pkg-type: rpm - distro: photon - version: "5" - arch: aarch64 - - pkg-type: rpm - distro: redhat - version: "8" - arch: x86_64 - - pkg-type: rpm - distro: redhat - version: "8" - arch: arm64 - - pkg-type: rpm - distro: redhat - version: "8" - arch: aarch64 - - pkg-type: rpm - distro: redhat - version: "9" - arch: x86_64 - - pkg-type: rpm - distro: redhat - version: "9" - arch: arm64 - - pkg-type: rpm - distro: redhat - version: "9" - arch: aarch64 - - steps: - - uses: actions/checkout@v4 - - - name: Download System Dependencies - run: | - sudo apt update - sudo apt install -y rpm - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download RPM Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-rpm - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - env: - SALT_REPO_DOMAIN_RELEASE: ${{ vars.SALT_REPO_DOMAIN_RELEASE || 'repo.saltproject.io' }} - SALT_REPO_DOMAIN_STAGING: ${{ vars.SALT_REPO_DOMAIN_STAGING || 'staging.repo.saltproject.io' }} - run: | - tools pkg repo create rpm --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} --nightly-build-from=${{ github.ref_name }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-${{ matrix.pkg-type }}-${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }} - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo - - build-windows-repo: - name: Build Repository - environment: nightly - runs-on: - - self-hosted - - linux - - repo-nightly - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - pkg-type: - - windows - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download Windows NSIS x86 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-NSIS - path: artifacts/pkgs/incoming - - - name: Download Windows MSI x86 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-MSI - path: artifacts/pkgs/incoming - - - name: Download Windows NSIS amd64 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-NSIS - path: artifacts/pkgs/incoming - - - name: Download Windows MSI amd64 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-MSI - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create windows --key-id=64CBBC8173D76B3F --nightly-build-from=${{ github.ref_name }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-windows - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: windows-repo - - build-macos-repo: - name: Build Repository - environment: nightly - runs-on: - - self-hosted - - linux - - repo-nightly - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - pkg-type: - - macos - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download macOS x86_64 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86_64-macos - path: artifacts/pkgs/incoming - - - name: Download macOS Arch64 Packages - if: ${{ ! github.event.repository.fork }} - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create macos --key-id=64CBBC8173D76B3F --nightly-build-from=${{ github.ref_name }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-macos - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: macos-repo - - build-onedir-repo: - name: Build Repository - environment: nightly - runs-on: - - self-hosted - - linux - - repo-nightly - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-salt-onedir - strategy: - fail-fast: false - matrix: - pkg-type: - - onedir - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download Linux x86_64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Linux arm64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download macOS x86_64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download macOS arm64 Onedir Archive - if: ${{ ! github.event.repository.fork }} - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Windows amd64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Windows amd64 Onedir Archive(zip) - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.zip - path: artifacts/pkgs/incoming - - - name: Download Windows x86 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Windows amd64 Onedir Archive(zip) - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.zip - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create onedir --key-id=64CBBC8173D76B3F --nightly-build-from=${{ github.ref_name }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-onedir - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: onedir-repo - - publish-repositories: - name: Publish Repositories - if: ${{ always() && ! failure() && ! cancelled() }} - runs-on: - - self-hosted - - linux - - repo-nightly - environment: nightly - needs: - - prepare-workflow - - build-docs - - build-src-repo - - build-deb-repo - - build-rpm-repo - - build-windows-repo - - build-macos-repo - - build-onedir-repo - - build-ci-deps - - windows-2016 - - windows-2019 - - windows-2022 - - macos-12 - - macos-13 - - macos-13-arm64 - - rockylinux-8 - - rockylinux-8-arm64 - - rockylinux-9 - - rockylinux-9-arm64 - - amazonlinux-2 - - amazonlinux-2-arm64 - - amazonlinux-2023 - - amazonlinux-2023-arm64 - - debian-11 - - debian-11-arm64 - - debian-12 - - debian-12-arm64 - - fedora-40 - - opensuse-15 - - photonos-4 - - photonos-4-arm64 - - photonos-4-fips - - photonos-4-arm64-fips - - photonos-5 - - photonos-5-arm64 - - photonos-5-fips - - photonos-5-arm64-fips - - ubuntu-2004 - - ubuntu-2004-arm64 - - ubuntu-2204 - - ubuntu-2204-arm64 - - ubuntu-2404 - - ubuntu-2404-arm64 - - steps: - - - uses: actions/checkout@v4 - - - 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: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Download Repository Artifact - uses: actions/download-artifact@v4 - with: - pattern: salt-${{ needs.prepare-workflow.outputs.salt-version }}-nightly-repo-* - merge-multiple: true - path: repo/ - - - name: Decompress Repository Artifacts - run: | - find repo/ -type f -name '*.tar.gz' -print -exec tar xvf {} \; - find repo/ -type f -name '*.tar.gz' -print -exec rm -f {} \; - - - name: Show Repository - run: | - tree -a artifacts/pkgs/repo/ - - - name: Upload Repository Contents (nightly) - env: - SALT_REPO_DOMAIN_RELEASE: ${{ vars.SALT_REPO_DOMAIN_RELEASE || 'repo.saltproject.io' }} - SALT_REPO_DOMAIN_STAGING: ${{ vars.SALT_REPO_DOMAIN_STAGING || 'staging.repo.saltproject.io' }} - run: | - tools pkg repo publish nightly --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} artifacts/pkgs/repo/ - - set-pipeline-exit-status: - # This step is just so we can make github require this step, to pass checks - # on a pull request instead of requiring all - name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() - runs-on: ubuntu-latest - environment: nightly - needs: - - workflow-requirements - - trigger-branch-nightly-builds - - prepare-workflow - - pre-commit - - lint - - nsis-tests - - build-docs - - build-deps-onedir - - build-salt-onedir - - build-pkgs-src - - publish-repositories - - rockylinux-8-pkg-tests - - rockylinux-8-arm64-pkg-tests - - rockylinux-9-pkg-tests - - rockylinux-9-arm64-pkg-tests - - amazonlinux-2-pkg-tests - - amazonlinux-2-arm64-pkg-tests - - amazonlinux-2023-pkg-tests - - amazonlinux-2023-arm64-pkg-tests - - debian-11-pkg-tests - - debian-11-arm64-pkg-tests - - debian-12-pkg-tests - - debian-12-arm64-pkg-tests - - photonos-4-pkg-tests - - photonos-4-arm64-pkg-tests - - photonos-4-pkg-tests-fips - - photonos-4-arm64-pkg-tests-fips - - photonos-5-pkg-tests - - photonos-5-arm64-pkg-tests - - photonos-5-pkg-tests-fips - - photonos-5-arm64-pkg-tests-fips - - ubuntu-2004-pkg-tests - - ubuntu-2004-arm64-pkg-tests - - ubuntu-2204-pkg-tests - - ubuntu-2204-arm64-pkg-tests - - ubuntu-2404-pkg-tests - - ubuntu-2404-arm64-pkg-tests - - macos-12-pkg-tests - - macos-13-pkg-tests - - macos-13-arm64-pkg-tests - - windows-2016-nsis-pkg-tests - - windows-2016-msi-pkg-tests - - windows-2019-nsis-pkg-tests - - windows-2019-msi-pkg-tests - - windows-2022-nsis-pkg-tests - - windows-2022-msi-pkg-tests steps: - name: Get workflow information id: get-workflow-info diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index 658dbf5cc4d1..fa9cacd1f667 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -21,21 +21,16 @@ jobs: Pre-Commit: name: Run Pre-Commit Against Salt - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: - image: ghcr.io/saltstack/salt-ci-containers/python:3.10 + image: ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04 env: PRE_COMMIT_COLOR: always steps: - - name: Install System Deps - run: | - apt-get update - apt-get install -y wget curl enchant-2 git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev rustc - - name: Add Git Safe Directory run: | git config --global --add safe.directory "$(pwd)" diff --git a/.github/workflows/release-artifact.yml b/.github/workflows/release-artifact.yml new file mode 100644 index 000000000000..5829c676fbfb --- /dev/null +++ b/.github/workflows/release-artifact.yml @@ -0,0 +1,61 @@ +--- +name: Upload Release Artifact + +on: + workflow_call: + inputs: + name: + type: string + required: true + description: The Salt version to set prior to building packages. + upload_url: + type: string + required: true + description: Release's upload url. + + +jobs: + + list-files: + name: List ${{ inputs.name }} + runs-on: ubuntu-22.04 + outputs: + files: ${{ steps.list-files.outputs.files }} + steps: + - uses: actions/download-artifact@v4 + with: + name: ${{ inputs.name }} + path: artifacts + - run: find artifacts -maxdepth 1 -type f -printf '%f\n' + - id: list-files + run: | + echo files="$(find artifacts -maxdepth 1 -type f -printf '%f\n' | jq -Rnc '[inputs | { file: "\(.)" }]')" >> "$GITHUB_OUTPUT" + + upload-files: + name: Upload ${{ matrix.file }} from ${{ inputs.name }} + runs-on: ubuntu-22.04 + needs: + - list-files + strategy: + matrix: + include: ${{ fromJSON(needs.list-files.outputs.files) }} + steps: + - uses: actions/download-artifact@v4 + with: + name: ${{ inputs.name }} + path: artifacts + + - name: Detect type of ${{ matrix.file }} + id: file-type + run: echo "file_type=$( file --mime-type artifacts/${{ matrix.file }} )" >> "$GITHUB_OUTPUT" + + - name: Upload ${{ matrix.file }} + id: upload-release-asset-source + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ inputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: artifacts/${{ matrix.file }} + asset_name: ${{ matrix.file }} + asset_content_type: ${{ steps.file-type.outputs.file_type }} diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index bc4624ef0866..7d88b2d63f60 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -32,7 +32,7 @@ jobs: permissions: contents: write # for dev-drprasad/delete-tag-and-release to delete tags or releases name: Generate Tag and Github Release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: dev-drprasad/delete-tag-and-release@v0.2.0 if: github.event.inputs.reTag == 'true' diff --git a/.github/workflows/release-update-winrepo.yml b/.github/workflows/release-update-winrepo.yml index 4282709d72b0..542301f98c4d 100644 --- a/.github/workflows/release-update-winrepo.yml +++ b/.github/workflows/release-update-winrepo.yml @@ -19,7 +19,7 @@ permissions: jobs: update-winrepo: name: Update Winrepo - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout Salt diff --git a/.github/workflows/release-upload-virustotal.yml b/.github/workflows/release-upload-virustotal.yml index 431ea00039ab..dc760371bb21 100644 --- a/.github/workflows/release-upload-virustotal.yml +++ b/.github/workflows/release-upload-virustotal.yml @@ -31,7 +31,6 @@ jobs: runs-on: - self-hosted - linux - - repo-release steps: - name: Checkout Salt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30ced2d7efa8..6c616a7ca53f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-2 # Bump the number to invalidate all caches + CACHE_SEED: SEED-1 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" PIP_DISABLE_PIP_VERSION_CHECK: "1" RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" @@ -37,7 +37,7 @@ jobs: check-requirements: name: Check Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: release-check steps: - name: Check For Admin Permission @@ -49,11 +49,9 @@ jobs: prepare-workflow: name: Prepare Workflow Run runs-on: - - self-hosted - - linux - - repo-release + - linux-x86_64 env: - USE_S3_CACHE: 'true' + USE_S3_CACHE: 'false' environment: release needs: - check-requirements @@ -63,6 +61,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -121,12 +120,15 @@ jobs: run: | echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py', 'pkg/common/env-cleanup-rules.yml', '.github/workflows/build-deps-ci-action.yml') }}" | tee -a "$GITHUB_OUTPUT" + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config${{ inputs.skip-salt-pkg-download-test-suite && ' --skip-pkg-download-tests' || '' }} ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + download-onedir-artifact: name: Download Staging Onedir Artifact runs-on: - - self-hosted - - linux - - repo-release + - linux-x86_64 env: USE_S3_CACHE: 'true' environment: release @@ -186,13 +188,12 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} backup: name: Backup runs-on: - - self-hosted - - linux - - repo-release + - linux-x86_64 needs: - prepare-workflow env: @@ -223,9 +224,7 @@ jobs: publish-repositories: name: Publish Repositories runs-on: - - self-hosted - - linux - - repo-release + - linux-x86_64 env: USE_S3_CACHE: 'true' needs: @@ -255,40 +254,17 @@ jobs: run: | tools pkg repo publish release ${{ needs.prepare-workflow.outputs.salt-version }} - pkg-download-tests: - name: Package Downloads - if: ${{ inputs.skip-salt-pkg-download-test-suite == false }} - needs: - - prepare-workflow - - publish-repositories - - build-ci-deps - - download-onedir-artifact - uses: ./.github/workflows/test-package-downloads-action.yml - with: - nox-session: ci-test-onedir - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - environment: release - nox-version: 2022.8.7 - python-version: "3.10" - skip-code-coverage: true - latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" - secrets: inherit - release: name: Release v${{ needs.prepare-workflow.outputs.salt-version }} if: ${{ always() && ! failure() && ! cancelled() }} runs-on: - - self-hosted - - linux - - repo-release + - linux-x86_64 env: USE_S3_CACHE: 'true' needs: - prepare-workflow - backup - publish-repositories - - pkg-download-tests environment: release steps: - name: Clone The Salt Repository @@ -395,9 +371,7 @@ jobs: - release environment: release runs-on: - - self-hosted - - linux - - repo-release + - linux-x86_64 env: USE_S3_CACHE: 'true' steps: @@ -449,12 +423,11 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - check-requirements - prepare-workflow - publish-repositories - - pkg-download-tests - release - publish-pypi - build-ci-deps diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index dc57040b92c7..810454efae59 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -12,7 +12,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-2 # Bump the number to invalidate all caches + CACHE_SEED: SEED-1 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" PIP_DISABLE_PIP_VERSION_CHECK: "1" RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" @@ -30,7 +30,7 @@ jobs: workflow-requirements: name: Check Workflow Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: @@ -62,7 +62,7 @@ jobs: trigger-branch-scheduled-builds: name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - workflow-requirements steps: @@ -74,16 +74,13 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }} needs: - workflow-requirements outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} - runners: ${{ steps.runner-types.outputs.runners }} changed-files: ${{ steps.process-changed-files.outputs.changed-files }} - os-labels: ${{ steps.get-pull-labels.outputs.os-labels }} - pull-labels: ${{ steps.get-pull-labels.outputs.test-labels }} testrun: ${{ steps.define-testrun.outputs.testrun }} salt-version: ${{ steps.setup-salt-version.outputs.salt-version }} cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} @@ -91,6 +88,7 @@ jobs: releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -203,14 +201,6 @@ jobs: salt-version: "" validate-version: true - - name: Get Pull Request Test Labels - id: get-pull-labels - if: ${{ github.event_name == 'pull_request'}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - tools ci get-pr-test-labels --repository ${{ github.repository }} - - name: Get Hash For Nox Tarball Cache id: nox-archive-hash run: | @@ -235,11 +225,6 @@ jobs: run: | echo '${{ steps.process-changed-files.outputs.changed-files }}' | jq -C '.' - - name: Define Runner Types - id: runner-types - run: | - tools ci runner-types ${{ github.event_name }} - - name: Define Jobs To Run id: define-jobs run: | @@ -264,6 +249,11 @@ jobs: run: | tools ci define-testrun ${{ github.event_name }} changed-files.json + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + - name: Check Contents of generated testrun-changed-files.txt if: ${{ fromJSON(steps.define-testrun.outputs.testrun)['type'] != 'full' }} run: | @@ -279,7 +269,6 @@ jobs: pre-commit: name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow @@ -290,7 +279,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -298,7 +287,6 @@ jobs: changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} nsis-tests: name: NSIS Tests - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/nsis-tests.yml needs: - prepare-workflow @@ -307,8 +295,9 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ubuntu-latest + runs-on: + - ubuntu-22.04 + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -415,7 +404,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -426,11 +415,11 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -456,22 +445,21 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" build-deps-onedir: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + name: Build Onedir Dependencies + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -480,14 +468,13 @@ jobs: with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-pkgs-onedir: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -495,26 +482,13 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" source: "onedir" - - build-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir - uses: ./.github/workflows/build-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" - python-version: "3.10.15" - source: "src" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-ci-deps: name: CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] }} needs: - prepare-workflow - build-salt-onedir @@ -526,1476 +500,49 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" - - rockylinux-8-pkg-tests: - name: Rocky Linux 8 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-8-arm64-pkg-tests: - name: Rocky Linux 8 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-pkg-tests: - name: Rocky Linux 9 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-arm64-pkg-tests: - name: Rocky Linux 9 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2-pkg-tests: - name: Amazon Linux 2 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2-arm64-pkg-tests: - name: Amazon Linux 2 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2023-pkg-tests: - name: Amazon Linux 2023 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - amazonlinux-2023-arm64-pkg-tests: - name: Amazon Linux 2023 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-11-pkg-tests: - name: Debian 11 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-11-arm64-pkg-tests: - name: Debian 11 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-12-pkg-tests: - name: Debian 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - debian-12-arm64-pkg-tests: - name: Debian 12 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-pkg-tests: - name: Photon OS 4 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-arm64-pkg-tests: - name: Photon OS 4 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-4-pkg-tests-fips: - name: Photon OS 4 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-4-arm64-pkg-tests-fips: - name: Photon OS 4 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-pkg-tests: - name: Photon OS 5 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-arm64-pkg-tests: - name: Photon OS 5 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} + test-packages: + name: Test Package + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test-pkg'] }} needs: - prepare-workflow - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-packages-action.yml with: - distro-slug: photonos-5-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-pkg-tests-fips: - name: Photon OS 5 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-arm64-pkg-tests-fips: - name: Photon OS 5 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }} + test: + name: Test Salt + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test'] }} needs: - prepare-workflow - - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-action.yml with: - distro-slug: photonos-5-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - ubuntu-2004-pkg-tests: - name: Ubuntu 20.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2004-arm64-pkg-tests: - name: Ubuntu 20.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-pkg-tests: - name: Ubuntu 22.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-arm64-pkg-tests: - name: Ubuntu 22.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-pkg-tests: - name: Ubuntu 24.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-arm64-pkg-tests: - name: Ubuntu 24.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-12-pkg-tests: - name: macOS 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-pkg-tests: - name: macOS 13 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-arm64-pkg-tests: - name: macOS 13 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-nsis-pkg-tests: - name: Windows 2016 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-msi-pkg-tests: - name: Windows 2016 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-nsis-pkg-tests: - name: Windows 2019 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-msi-pkg-tests: - name: Windows 2019 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-nsis-pkg-tests: - name: Windows 2022 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-msi-pkg-tests: - name: Windows 2022 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016: - name: Windows 2016 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - windows-2019: - name: Windows 2019 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - windows-2022: - name: Windows 2022 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - macos-12: - name: macOS 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - macos-13: - name: macOS 13 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - macos-13-arm64: - name: macOS 13 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - rockylinux-8: - name: Rocky Linux 8 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - rockylinux-8-arm64: - name: Rocky Linux 8 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - rockylinux-9: - name: Rocky Linux 9 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - rockylinux-9-arm64: - name: Rocky Linux 9 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - amazonlinux-2: - name: Amazon Linux 2 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - amazonlinux-2-arm64: - name: Amazon Linux 2 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - amazonlinux-2023: - name: Amazon Linux 2023 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - amazonlinux-2023-arm64: - name: Amazon Linux 2023 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - debian-11: - name: Debian 11 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - debian-11-arm64: - name: Debian 11 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - debian-12: - name: Debian 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - debian-12-arm64: - name: Debian 12 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - fedora-40: - name: Fedora 40 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: fedora-40 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - opensuse-15: - name: Opensuse 15 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - photonos-4: - name: Photon OS 4 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - photonos-4-arm64: - name: Photon OS 4 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - photonos-4-fips: - name: Photon OS 4 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - fips: true - - photonos-4-arm64-fips: - name: Photon OS 4 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - fips: true - - photonos-5: - name: Photon OS 5 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - photonos-5-arm64: - name: Photon OS 5 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - photonos-5-fips: - name: Photon OS 5 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - fips: true - - photonos-5-arm64-fips: - name: Photon OS 5 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - fips: true - - ubuntu-2004: - name: Ubuntu 20.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - ubuntu-2004-arm64: - name: Ubuntu 20.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - ubuntu-2204: - name: Ubuntu 22.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - ubuntu-2204-arm64: - name: Ubuntu 22.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - ubuntu-2404: - name: Ubuntu 24.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: scheduled - default-timeout: 360 - - ubuntu-2404-arm64: - name: Ubuntu 24.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: true workflow-slug: scheduled default-timeout: 360 + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }} set-pipeline-exit-status: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - workflow-requirements - trigger-branch-scheduled-builds @@ -2006,77 +553,7 @@ jobs: - build-docs - build-deps-onedir - build-salt-onedir - - build-pkgs-src - build-ci-deps - - windows-2016 - - windows-2019 - - windows-2022 - - macos-12 - - macos-13 - - macos-13-arm64 - - rockylinux-8 - - rockylinux-8-arm64 - - rockylinux-9 - - rockylinux-9-arm64 - - amazonlinux-2 - - amazonlinux-2-arm64 - - amazonlinux-2023 - - amazonlinux-2023-arm64 - - debian-11 - - debian-11-arm64 - - debian-12 - - debian-12-arm64 - - fedora-40 - - opensuse-15 - - photonos-4 - - photonos-4-arm64 - - photonos-4-fips - - photonos-4-arm64-fips - - photonos-5 - - photonos-5-arm64 - - photonos-5-fips - - photonos-5-arm64-fips - - ubuntu-2004 - - ubuntu-2004-arm64 - - ubuntu-2204 - - ubuntu-2204-arm64 - - ubuntu-2404 - - ubuntu-2404-arm64 - - rockylinux-8-pkg-tests - - rockylinux-8-arm64-pkg-tests - - rockylinux-9-pkg-tests - - rockylinux-9-arm64-pkg-tests - - amazonlinux-2-pkg-tests - - amazonlinux-2-arm64-pkg-tests - - amazonlinux-2023-pkg-tests - - amazonlinux-2023-arm64-pkg-tests - - debian-11-pkg-tests - - debian-11-arm64-pkg-tests - - debian-12-pkg-tests - - debian-12-arm64-pkg-tests - - photonos-4-pkg-tests - - photonos-4-arm64-pkg-tests - - photonos-4-pkg-tests-fips - - photonos-4-arm64-pkg-tests-fips - - photonos-5-pkg-tests - - photonos-5-arm64-pkg-tests - - photonos-5-pkg-tests-fips - - photonos-5-arm64-pkg-tests-fips - - ubuntu-2004-pkg-tests - - ubuntu-2004-arm64-pkg-tests - - ubuntu-2204-pkg-tests - - ubuntu-2204-arm64-pkg-tests - - ubuntu-2404-pkg-tests - - ubuntu-2404-arm64-pkg-tests - - macos-12-pkg-tests - - macos-13-pkg-tests - - macos-13-arm64-pkg-tests - - windows-2016-nsis-pkg-tests - - windows-2016-msi-pkg-tests - - windows-2019-nsis-pkg-tests - - windows-2019-msi-pkg-tests - - windows-2022-nsis-pkg-tests - - windows-2022-msi-pkg-tests steps: - name: Get workflow information id: get-workflow-info diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index e625038505e5..33e262ca5c40 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -37,7 +37,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-2 # Bump the number to invalidate all caches + CACHE_SEED: SEED-1 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" PIP_DISABLE_PIP_VERSION_CHECK: "1" RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" @@ -47,15 +47,15 @@ permissions: pull-requests: read # for dorny/paths-filter to read pull requests actions: read # for technote-space/workflow-conclusion-action to get the job statuses -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.repository }} - cancel-in-progress: false +#concurrency: +# group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.repository }} +# cancel-in-progress: false jobs: check-requirements: name: Check Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: staging-check steps: - name: Check For Admin Permission @@ -66,15 +66,12 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - check-requirements outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} - runners: ${{ steps.runner-types.outputs.runners }} changed-files: ${{ steps.process-changed-files.outputs.changed-files }} - os-labels: ${{ steps.get-pull-labels.outputs.os-labels }} - pull-labels: ${{ steps.get-pull-labels.outputs.test-labels }} testrun: ${{ steps.define-testrun.outputs.testrun }} salt-version: ${{ steps.setup-salt-version.outputs.salt-version }} cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} @@ -82,6 +79,7 @@ jobs: releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -194,14 +192,6 @@ jobs: salt-version: "${{ inputs.salt-version }}" validate-version: true - - name: Get Pull Request Test Labels - id: get-pull-labels - if: ${{ github.event_name == 'pull_request'}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - tools ci get-pr-test-labels --repository ${{ github.repository }} - - name: Get Hash For Nox Tarball Cache id: nox-archive-hash run: | @@ -235,11 +225,6 @@ jobs: run: | echo '${{ steps.process-changed-files.outputs.changed-files }}' | jq -C '.' - - name: Define Runner Types - id: runner-types - run: | - tools ci runner-types ${{ github.event_name }} - - name: Define Jobs To Run id: define-jobs run: | @@ -264,6 +249,11 @@ jobs: run: | tools ci define-testrun ${{ github.event_name }} changed-files.json + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config${{ inputs.skip-salt-test-suite && ' --skip-tests' || '' }}${{ inputs.skip-salt-pkg-test-suite && ' --skip-pkg-tests' || '' }}${{ inputs.skip-salt-pkg-download-test-suite && ' --skip-pkg-download-tests' || '' }} ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + - name: Check Contents of generated testrun-changed-files.txt if: ${{ fromJSON(steps.define-testrun.outputs.testrun)['type'] != 'full' }} run: | @@ -279,7 +269,6 @@ jobs: pre-commit: name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow @@ -290,7 +279,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['lint'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -298,7 +287,6 @@ jobs: changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} nsis-tests: name: NSIS Tests - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/nsis-tests.yml needs: - prepare-workflow @@ -307,17 +295,19 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} runs-on: - - self-hosted - - linux - - medium - - x86_64 + - ubuntu-22.04 + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Setup Python Tools Scripts uses: ./.github/actions/setup-python-tools-scripts with: @@ -415,7 +405,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-docs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -426,11 +416,11 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-source-tarball'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -456,22 +446,21 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" build-deps-onedir: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + name: Build Onedir Dependencies + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -480,14 +469,13 @@ jobs: with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} build-pkgs-onedir: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -495,9 +483,10 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" source: "onedir" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} environment: staging sign-macos-packages: false sign-windows-packages: ${{ inputs.sign-windows-packages }} @@ -505,7 +494,7 @@ jobs: build-pkgs-src: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -513,16 +502,17 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.17.3" + relenv-version: "0.18.0" python-version: "3.10.15" source: "src" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} environment: staging sign-macos-packages: false sign-windows-packages: ${{ inputs.sign-windows-packages }} secrets: inherit build-ci-deps: name: CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] }} needs: - prepare-workflow - build-salt-onedir @@ -534,2479 +524,159 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" - - rockylinux-8-pkg-tests: - name: Rocky Linux 8 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-8-arm64-pkg-tests: - name: Rocky Linux 8 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} + test-packages: + name: Test Package + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test-pkg'] }} needs: - prepare-workflow - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-packages-action.yml with: - distro-slug: rockylinux-8-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-pkg-tests: - name: Rocky Linux 9 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }} + test: + name: Test Salt + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test'] }} needs: - prepare-workflow - - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-action.yml with: - distro-slug: rockylinux-9 nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm nox-version: 2022.8.7 python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - rockylinux-9-arm64-pkg-tests: - name: Rocky Linux 9 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 + testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + workflow-slug: staging + default-timeout: 180 + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }} - amazonlinux-2-pkg-tests: - name: Amazon Linux 2 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + upload-release-artifacts: + name: Upload Release Artifacts needs: - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - build-docs + environment: staging + runs-on: + - ubuntu-22.04 + steps: + - uses: actions/checkout@v4 - amazonlinux-2-arm64-pkg-tests: - name: Amazon Linux 2 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - amazonlinux-2023-pkg-tests: - name: Amazon Linux 2023 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Download Release Patch + uses: actions/download-artifact@v4 + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch + path: artifacts/release - amazonlinux-2023-arm64-pkg-tests: - name: Amazon Linux 2023 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Download Release Documentation (HTML) + uses: actions/download-artifact@v4 + with: + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-docs-html.tar.xz + path: artifacts/release - debian-11-pkg-tests: - name: Debian 11 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Show Release Artifacts + run: | + tree -a artifacts/release - debian-11-arm64-pkg-tests: - name: Debian 11 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + publish-pypi: + name: Publish to PyPi(test) + if: ${{ inputs.skip-test-pypi-publish != true && github.event.repository.fork != true }} needs: - prepare-workflow - - build-pkgs-onedir + - upload-release-artifacts - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + environment: staging + runs-on: + - ubuntu-22.04 + steps: + - uses: actions/checkout@v4 - debian-12-pkg-tests: - name: Debian 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - debian-12-arm64-pkg-tests: - name: Debian 12 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Setup GnuPG + run: | + sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg + GNUPGHOME="$(mktemp -d -p /run/gpg)" + echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" + cat < "${GNUPGHOME}/gpg.conf" + batch + no-tty + pinentry-mode loopback + EOF - photonos-4-pkg-tests: - name: Photon OS 4 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Get Secrets + id: get-secrets + env: + SECRETS_KEY: ${{ secrets.SECRETS_KEY }} + run: | + SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) + echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" + TWINE_PASSWORD=$(aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/publishing/publish-test-pypi \ + --query SecretString --output text | jq .default_passphrase -r | base64 -d \ + | gpg --passphrase-file "$SECRETS_KEY_FILE" -d -) + echo "::add-mask::$TWINE_PASSWORD" + echo "twine-password=$TWINE_PASSWORD" >> "${GITHUB_OUTPUT}" - photonos-4-arm64-pkg-tests: - name: Photon OS 4 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + - name: Download PyPi Artifacts + uses: actions/download-artifact@v4 + with: + name: pypi-artifacts + path: artifacts/release - photonos-4-pkg-tests-fips: - name: Photon OS 4 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true + - name: Publish to Test PyPi + env: + TWINE_PASSWORD: "${{ steps.get-secrets.outputs.twine-password }}" + run: | + tools pkg pypi-upload --test artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - photonos-4-arm64-pkg-tests-fips: - name: Photon OS 4 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + draft-release: + name: Draft Github Release + if: | + always() && (needs.test.result == 'success' || needs.test.result == 'skipped') && + (needs.test-packages.result == 'success' || needs.test-packages.result == 'skipped') && + needs.prepare-workflow.result == 'success' && needs.build-salt-onedir.result == 'success' && + needs.build-pkgs-onedir.result == 'success' && needs.pre-commit.result == 'success' needs: - prepare-workflow + - pre-commit + - build-salt-onedir - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + - test-packages + - test + permissions: + contents: write + pull-requests: read + id-token: write + uses: ./.github/workflows/draft-release.yml with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-pkg-tests: - name: Photon OS 5 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-arm64-pkg-tests: - name: Photon OS 5 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - photonos-5-pkg-tests-fips: - name: Photon OS 5 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - photonos-5-arm64-pkg-tests-fips: - name: Photon OS 5 Arm64 Package Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: rpm - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - fips: true - - ubuntu-2004-pkg-tests: - name: Ubuntu 20.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2004-arm64-pkg-tests: - name: Ubuntu 20.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-pkg-tests: - name: Ubuntu 22.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2204-arm64-pkg-tests: - name: Ubuntu 22.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-pkg-tests: - name: Ubuntu 24.04 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - ubuntu-2404-arm64-pkg-tests: - name: Ubuntu 24.04 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: deb - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-12-pkg-tests: - name: macOS 12 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-pkg-tests: - name: macOS 13 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - macos-13-arm64-pkg-tests: - name: macOS 13 Arm64 Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-nsis-pkg-tests: - name: Windows 2016 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016-msi-pkg-tests: - name: Windows 2016 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-nsis-pkg-tests: - name: Windows 2019 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2019-msi-pkg-tests: - name: Windows 2019 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-nsis-pkg-tests: - name: Windows 2022 NSIS Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: NSIS - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2022-msi-pkg-tests: - name: Windows 2022 MSI Package Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: MSI - nox-version: 2022.8.7 - python-version: "3.10" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - windows-2016: - name: Windows 2016 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - windows-2019: - name: Windows 2019 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - windows-2022: - name: Windows 2022 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - macos-12: - name: macOS 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-12 - runner: macos-12 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - macos-13: - name: macOS 13 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13 - runner: macos-13 - nox-session: ci-test-onedir - platform: macos - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - macos-13-arm64: - name: macOS 13 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: macos-13-arm64 - runner: macos-13-xlarge - nox-session: ci-test-onedir - platform: macos - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - rockylinux-8: - name: Rocky Linux 8 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - rockylinux-8-arm64: - name: Rocky Linux 8 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - rockylinux-9: - name: Rocky Linux 9 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - rockylinux-9-arm64: - name: Rocky Linux 9 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: rockylinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - amazonlinux-2: - name: Amazon Linux 2 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - amazonlinux-2-arm64: - name: Amazon Linux 2 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - amazonlinux-2023: - name: Amazon Linux 2023 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - amazonlinux-2023-arm64: - name: Amazon Linux 2023 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - debian-11: - name: Debian 11 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - debian-11-arm64: - name: Debian 11 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - debian-12: - name: Debian 12 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - debian-12-arm64: - name: Debian 12 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - fedora-40: - name: Fedora 40 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: fedora-40 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - opensuse-15: - name: Opensuse 15 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - photonos-4: - name: Photon OS 4 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - photonos-4-arm64: - name: Photon OS 4 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - photonos-4-fips: - name: Photon OS 4 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - fips: true - - photonos-4-arm64-fips: - name: Photon OS 4 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - fips: true - - photonos-5: - name: Photon OS 5 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - photonos-5-arm64: - name: Photon OS 5 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - photonos-5-fips: - name: Photon OS 5 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - fips: true - - photonos-5-arm64-fips: - name: Photon OS 5 Arm64 Test (fips) - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - fips: true - - ubuntu-2004: - name: Ubuntu 20.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - ubuntu-2004-arm64: - name: Ubuntu 20.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - ubuntu-2204: - name: Ubuntu 22.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - ubuntu-2204-arm64: - name: Ubuntu 22.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - ubuntu-2404: - name: Ubuntu 24.04 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - ubuntu-2404-arm64: - name: Ubuntu 24.04 Arm64 Test - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: ubuntu-24.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 - nox-version: 2022.8.7 - gh-actions-python-version: "3.10" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - skip-code-coverage: true - workflow-slug: staging - default-timeout: 180 - - build-src-repo: - name: Build Repository - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-source-tarball - - build-pkgs-src - strategy: - fail-fast: false - matrix: - pkg-type: - - src - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download Source Tarball - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create src --key-id=64CBBC8173D76B3F \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Copy Files For Source Only Artifact Uploads - run: | - mkdir artifacts/src - find artifacts/pkgs/repo -type f -print -exec cp {} artifacts/src \; - - - name: Upload Standalone Repository As An Artifact - uses: actions/upload-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-src-repo - path: | - artifacts/src/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - artifacts/src/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.* - artifacts/src/*-GPG-* - retention-days: 7 - if-no-files-found: error - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-src - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: src-repo - - build-deb-repo: - name: Build Repository - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - include: - - pkg-type: deb - distro: debian - version: "11" - arch: x86_64 - - pkg-type: deb - distro: debian - version: "11" - arch: arm64 - - pkg-type: deb - distro: debian - version: "12" - arch: x86_64 - - pkg-type: deb - distro: debian - version: "12" - arch: arm64 - - pkg-type: deb - distro: ubuntu - version: "20.04" - arch: x86_64 - - pkg-type: deb - distro: ubuntu - version: "20.04" - arch: arm64 - - pkg-type: deb - distro: ubuntu - version: "22.04" - arch: x86_64 - - pkg-type: deb - distro: ubuntu - version: "22.04" - arch: arm64 - - pkg-type: deb - distro: ubuntu - version: "24.04" - arch: x86_64 - - pkg-type: deb - distro: ubuntu - version: "24.04" - arch: arm64 - - steps: - - uses: actions/checkout@v4 - - - name: Download System Dependencies - run: | - sudo apt update - sudo apt install -y devscripts apt-utils - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download DEB Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-deb - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create deb --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-${{ matrix.pkg-type }}-${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }} - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo - - build-rpm-repo: - name: Build Repository - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - include: - - pkg-type: rpm - distro: amazon - version: "2" - arch: x86_64 - - pkg-type: rpm - distro: amazon - version: "2" - arch: arm64 - - pkg-type: rpm - distro: amazon - version: "2" - arch: aarch64 - - pkg-type: rpm - distro: amazon - version: "2023" - arch: x86_64 - - pkg-type: rpm - distro: amazon - version: "2023" - arch: arm64 - - pkg-type: rpm - distro: amazon - version: "2023" - arch: aarch64 - - pkg-type: rpm - distro: fedora - version: "40" - arch: x86_64 - - pkg-type: rpm - distro: fedora - version: "40" - arch: arm64 - - pkg-type: rpm - distro: fedora - version: "40" - arch: aarch64 - - pkg-type: rpm - distro: photon - version: "4" - arch: x86_64 - - pkg-type: rpm - distro: photon - version: "4" - arch: arm64 - - pkg-type: rpm - distro: photon - version: "4" - arch: aarch64 - - pkg-type: rpm - distro: photon - version: "5" - arch: x86_64 - - pkg-type: rpm - distro: photon - version: "5" - arch: arm64 - - pkg-type: rpm - distro: photon - version: "5" - arch: aarch64 - - pkg-type: rpm - distro: redhat - version: "8" - arch: x86_64 - - pkg-type: rpm - distro: redhat - version: "8" - arch: arm64 - - pkg-type: rpm - distro: redhat - version: "8" - arch: aarch64 - - pkg-type: rpm - distro: redhat - version: "9" - arch: x86_64 - - pkg-type: rpm - distro: redhat - version: "9" - arch: arm64 - - pkg-type: rpm - distro: redhat - version: "9" - arch: aarch64 - - steps: - - uses: actions/checkout@v4 - - - name: Download System Dependencies - run: | - sudo apt update - sudo apt install -y rpm - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download RPM Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-rpm - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - env: - SALT_REPO_USER: ${{ secrets.SALT_REPO_USER }} - SALT_REPO_PASS: ${{ secrets.SALT_REPO_PASS }} - SALT_REPO_DOMAIN_RELEASE: ${{ vars.SALT_REPO_DOMAIN_RELEASE || 'repo.saltproject.io' }} - SALT_REPO_DOMAIN_STAGING: ${{ vars.SALT_REPO_DOMAIN_STAGING || 'staging.repo.saltproject.io' }} - run: | - tools pkg repo create rpm --key-id=64CBBC8173D76B3F --distro-arch=${{ matrix.arch }} \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-${{ matrix.pkg-type }}-${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }} - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-repo - - build-windows-repo: - name: Build Repository - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - pkg-type: - - windows - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download Windows NSIS x86 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-NSIS - path: artifacts/pkgs/incoming - - - name: Download Windows MSI x86 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86-MSI - path: artifacts/pkgs/incoming - - - name: Download Windows NSIS amd64 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-NSIS - path: artifacts/pkgs/incoming - - - name: Download Windows MSI amd64 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-amd64-MSI - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create windows --key-id=64CBBC8173D76B3F \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-windows - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: windows-repo - - build-macos-repo: - name: Build Repository - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-pkgs-onedir - strategy: - fail-fast: false - matrix: - pkg-type: - - macos - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download macOS x86_64 Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-x86_64-macos - path: artifacts/pkgs/incoming - - - name: Download macOS Arch64 Packages - if: ${{ ! github.event.repository.fork }} - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create macos --key-id=64CBBC8173D76B3F \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-macos - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: macos-repo - - build-onedir-repo: - name: Build Repository - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - - build-salt-onedir - strategy: - fail-fast: false - matrix: - pkg-type: - - onedir - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - 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: Download Linux x86_64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Linux arm64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download macOS x86_64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download macOS arm64 Onedir Archive - if: ${{ ! github.event.repository.fork }} - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Windows amd64 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Windows amd64 Onedir Archive(zip) - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-amd64.zip - path: artifacts/pkgs/incoming - - - name: Download Windows x86 Onedir Archive - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.tar.xz - path: artifacts/pkgs/incoming - - - name: Download Windows amd64 Onedir Archive(zip) - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-windows-x86.zip - path: artifacts/pkgs/incoming - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text | jq .default_key -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -d - \ - | gpg --import - - sync - aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/signing/repo-signing-keys-sha256-2023 \ - --query SecretString --output text| jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "${SECRETS_KEY_FILE}" -o "${GNUPGHOME}/passphrase" -d - - sync - rm "$SECRETS_KEY_FILE" - echo "passphrase-file ${GNUPGHOME}/passphrase" >> "${GNUPGHOME}/gpg.conf" - - - name: Create Repository Path - run: | - mkdir -p artifacts/pkgs/repo - - - name: Create Repository - run: | - tools pkg repo create onedir --key-id=64CBBC8173D76B3F \ - --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} \ - --incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo - - - name: Upload Repository As An Artifact - uses: ./.github/actions/upload-artifact - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-onedir - path: artifacts/pkgs/repo/* - retention-days: 7 - if-no-files-found: error - archive-name: onedir-repo - - publish-repositories: - name: Publish Repositories - if: ${{ always() && ! failure() && ! cancelled() }} - runs-on: - - self-hosted - - linux - - repo-staging - environment: staging - needs: - - prepare-workflow - - build-docs - - build-src-repo - - build-deb-repo - - build-rpm-repo - - build-windows-repo - - build-macos-repo - - build-onedir-repo - - steps: - - - uses: actions/checkout@v4 - - - 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: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Download Repository Artifact - uses: actions/download-artifact@v4 - with: - pattern: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-repo-* - merge-multiple: true - path: repo/ - - - name: Decompress Repository Artifacts - run: | - find repo/ -type f -name '*.tar.gz' -print -exec tar xvf {} \; - find repo/ -type f -name '*.tar.gz' -print -exec rm -f {} \; - - - name: Show Repository - run: | - tree -a artifacts/pkgs/repo/ - - - name: Upload Repository Contents (staging) - env: - SALT_REPO_DOMAIN_RELEASE: ${{ vars.SALT_REPO_DOMAIN_RELEASE || 'repo.saltproject.io' }} - SALT_REPO_DOMAIN_STAGING: ${{ vars.SALT_REPO_DOMAIN_STAGING || 'staging.repo.saltproject.io' }} - run: | - tools pkg repo publish staging --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} artifacts/pkgs/repo/ - - upload-release-artifacts: - name: Upload Release Artifacts - needs: - - prepare-workflow - - build-docs - - build-src-repo - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - steps: - - uses: actions/checkout@v4 - - - 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: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Download Release Patch - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch - path: artifacts/release - - - name: Download Source Repository - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-staging-src-repo - path: artifacts/release - - - name: Download Release Documentation (HTML) - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-docs-html.tar.xz - path: artifacts/release - - - name: Show Release Artifacts - run: | - tree -a artifacts/release - - - name: Upload Release Artifacts - run: | - tools release upload-artifacts ${{ needs.prepare-workflow.outputs.salt-version }} artifacts/release - - - name: Upload PyPi Artifacts - uses: actions/upload-artifact@v4 - with: - name: pypi-artifacts - path: | - artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.asc - retention-days: 7 - if-no-files-found: error - - pkg-download-tests: - name: Package Downloads - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg-download'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - publish-repositories - - build-ci-deps - - build-salt-onedir - uses: ./.github/workflows/test-package-downloads-action.yml - with: - nox-session: ci-test-onedir - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15 - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - environment: staging - nox-version: 2022.8.7 - python-version: "3.10" - skip-code-coverage: true - latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" - secrets: inherit - - publish-pypi: - name: Publish to PyPi(test) - if: ${{ inputs.skip-test-pypi-publish != true && github.event.repository.fork != true }} - needs: - - prepare-workflow - - upload-release-artifacts - - build-ci-deps - - windows-2016 - - windows-2019 - - windows-2022 - - macos-12 - - macos-13 - - macos-13-arm64 - - rockylinux-8 - - rockylinux-8-arm64 - - rockylinux-9 - - rockylinux-9-arm64 - - amazonlinux-2 - - amazonlinux-2-arm64 - - amazonlinux-2023 - - amazonlinux-2023-arm64 - - debian-11 - - debian-11-arm64 - - debian-12 - - debian-12-arm64 - - fedora-40 - - opensuse-15 - - photonos-4 - - photonos-4-arm64 - - photonos-4-fips - - photonos-4-arm64-fips - - photonos-5 - - photonos-5-arm64 - - photonos-5-fips - - photonos-5-arm64-fips - - ubuntu-2004 - - ubuntu-2004-arm64 - - ubuntu-2204 - - ubuntu-2204-arm64 - - ubuntu-2404 - - ubuntu-2404-arm64 - - rockylinux-8-pkg-tests - - rockylinux-8-arm64-pkg-tests - - rockylinux-9-pkg-tests - - rockylinux-9-arm64-pkg-tests - - amazonlinux-2-pkg-tests - - amazonlinux-2-arm64-pkg-tests - - amazonlinux-2023-pkg-tests - - amazonlinux-2023-arm64-pkg-tests - - debian-11-pkg-tests - - debian-11-arm64-pkg-tests - - debian-12-pkg-tests - - debian-12-arm64-pkg-tests - - photonos-4-pkg-tests - - photonos-4-arm64-pkg-tests - - photonos-4-pkg-tests-fips - - photonos-4-arm64-pkg-tests-fips - - photonos-5-pkg-tests - - photonos-5-arm64-pkg-tests - - photonos-5-pkg-tests-fips - - photonos-5-arm64-pkg-tests-fips - - ubuntu-2004-pkg-tests - - ubuntu-2004-arm64-pkg-tests - - ubuntu-2204-pkg-tests - - ubuntu-2204-arm64-pkg-tests - - ubuntu-2404-pkg-tests - - ubuntu-2404-arm64-pkg-tests - - macos-12-pkg-tests - - macos-13-pkg-tests - - macos-13-arm64-pkg-tests - - windows-2016-nsis-pkg-tests - - windows-2016-msi-pkg-tests - - windows-2019-nsis-pkg-tests - - windows-2019-msi-pkg-tests - - windows-2022-nsis-pkg-tests - - windows-2022-msi-pkg-tests - - pkg-download-tests - environment: staging - runs-on: - - self-hosted - - linux - - repo-staging - steps: - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Setup GnuPG - run: | - sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /run/gpg - GNUPGHOME="$(mktemp -d -p /run/gpg)" - echo "GNUPGHOME=${GNUPGHOME}" >> "$GITHUB_ENV" - cat < "${GNUPGHOME}/gpg.conf" - batch - no-tty - pinentry-mode loopback - EOF - - - name: Get Secrets - id: get-secrets - env: - SECRETS_KEY: ${{ secrets.SECRETS_KEY }} - run: | - SECRETS_KEY_FILE=$(mktemp /tmp/output.XXXXXXXXXX) - echo "$SECRETS_KEY" > "$SECRETS_KEY_FILE" - TWINE_PASSWORD=$(aws --region us-west-2 secretsmanager get-secret-value --secret-id /cmbu-saltstack/publishing/publish-test-pypi \ - --query SecretString --output text | jq .default_passphrase -r | base64 -d \ - | gpg --passphrase-file "$SECRETS_KEY_FILE" -d -) - echo "::add-mask::$TWINE_PASSWORD" - echo "twine-password=$TWINE_PASSWORD" >> "${GITHUB_OUTPUT}" - - - name: Download PyPi Artifacts - uses: actions/download-artifact@v4 - with: - name: pypi-artifacts - path: artifacts/release - - - name: Publish to Test PyPi - env: - TWINE_PASSWORD: "${{ steps.get-secrets.outputs.twine-password }}" - run: | - tools pkg pypi-upload --test artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['artifact-matrix']) }} + build-matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} set-pipeline-exit-status: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - check-requirements - prepare-workflow @@ -3017,9 +687,7 @@ jobs: - build-deps-onedir - build-salt-onedir - build-pkgs-src - - publish-repositories - upload-release-artifacts - - pkg-download-tests - publish-pypi steps: - name: Get workflow information diff --git a/.github/workflows/templates/build-ci-deps.yml.jinja b/.github/workflows/templates/build-ci-deps.yml.jinja index 59f2bf0b9bcf..6f97249fd43b 100644 --- a/.github/workflows/templates/build-ci-deps.yml.jinja +++ b/.github/workflows/templates/build-ci-deps.yml.jinja @@ -1,9 +1,10 @@ build-ci-deps: <%- do test_salt_needs.append("build-ci-deps") %> + <%- do test_salt_linux_needs.append("build-ci-deps") %> name: CI Deps <%- if workflow_slug != 'release' %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] }} <%- endif %> needs: - prepare-workflow @@ -20,3 +21,4 @@ salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} diff --git a/.github/workflows/templates/build-deb-repo.yml.jinja b/.github/workflows/templates/build-deb-repo.yml.jinja index 91f8348385c3..0772375c76ed 100644 --- a/.github/workflows/templates/build-deb-repo.yml.jinja +++ b/.github/workflows/templates/build-deb-repo.yml.jinja @@ -23,12 +23,6 @@ with: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - 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: Download DEB Packages uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/templates/build-macos-repo.yml.jinja b/.github/workflows/templates/build-macos-repo.yml.jinja index 835e366bf525..6753d64133b8 100644 --- a/.github/workflows/templates/build-macos-repo.yml.jinja +++ b/.github/workflows/templates/build-macos-repo.yml.jinja @@ -13,12 +13,6 @@ with: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - 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: Download macOS x86_64 Packages uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/templates/build-onedir-repo.yml.jinja b/.github/workflows/templates/build-onedir-repo.yml.jinja index c6b51f07166e..bb7db53905e8 100644 --- a/.github/workflows/templates/build-onedir-repo.yml.jinja +++ b/.github/workflows/templates/build-onedir-repo.yml.jinja @@ -13,12 +13,6 @@ with: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - 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: Download Linux x86_64 Onedir Archive uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/templates/build-packages.yml.jinja b/.github/workflows/templates/build-packages.yml.jinja index e2ae278a044b..bd5a532910eb 100644 --- a/.github/workflows/templates/build-packages.yml.jinja +++ b/.github/workflows/templates/build-packages.yml.jinja @@ -1,4 +1,9 @@ - <%- for backend in ("onedir", "src") %> +<%- if gh_environment != "ci" -%> +<%- set pkg_types = ("onedir", "src") %> +<%- else -%> +<%- set pkg_types = ("onedir",) %> +<%- endif -%> + <%- for backend in pkg_types %> <%- set job_name = "build-pkgs-{}".format(backend) %> <%- if backend == "src" %> <%- do conclusion_needs.append(job_name) %> @@ -6,7 +11,7 @@ <{ job_name }>: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] }} needs: - prepare-workflow - build-salt-onedir @@ -17,11 +22,13 @@ relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" source: "<{ backend }>" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} <%- if gh_environment != "ci" %> environment: <{ gh_environment }> sign-macos-packages: false sign-windows-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-windows-packages }} <%- endif %> secrets: inherit + <%- endif %> <%- endfor %> diff --git a/.github/workflows/templates/build-repos.yml.jinja b/.github/workflows/templates/build-repos.yml.jinja deleted file mode 100644 index 92f621c857ea..000000000000 --- a/.github/workflows/templates/build-repos.yml.jinja +++ /dev/null @@ -1,35 +0,0 @@ -<%- for type, display_name in ( - ("src", "Source"), - ("deb", "DEB"), - ("rpm", "RPM"), - ("windows", "Windows"), - ("macos", "macOS"), - ("onedir", "Onedir"), - ) %> - - <%- set job_name = "build-{}-repo".format(type) %> - <%- do build_repo_needs.append(job_name) %> - - <{ job_name }>: - name: Build Repository - environment: <{ gh_environment }> - runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> - env: - USE_S3_CACHE: 'true' - needs: - - prepare-workflow - <%- if type not in ("src", "onedir") %> - - build-pkgs-onedir - <%- elif type == 'onedir' %> - - build-salt-onedir - <%- elif type == 'src' %> - - build-source-tarball - - build-pkgs-src - <%- endif %> - - <%- include "build-{}-repo.yml.jinja".format(type) %> - -<%- endfor %> diff --git a/.github/workflows/templates/build-rpm-repo.yml.jinja b/.github/workflows/templates/build-rpm-repo.yml.jinja index 7039043d4bf0..836382bac429 100644 --- a/.github/workflows/templates/build-rpm-repo.yml.jinja +++ b/.github/workflows/templates/build-rpm-repo.yml.jinja @@ -23,12 +23,6 @@ with: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - 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: Download RPM Packages uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/templates/build-src-repo.yml.jinja b/.github/workflows/templates/build-src-repo.yml.jinja index 8409f05879b2..9127ba7aae67 100644 --- a/.github/workflows/templates/build-src-repo.yml.jinja +++ b/.github/workflows/templates/build-src-repo.yml.jinja @@ -13,12 +13,6 @@ with: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - 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: Download Source Tarball uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index cf8a33415ce7..38a7cec037c2 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -12,7 +12,6 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: Pre-Commit - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/pre-commit-action.yml needs: - prepare-workflow @@ -30,7 +29,7 @@ lint: <%- do conclusion_needs.append('lint') %> name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -44,7 +43,6 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: NSIS Tests - if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} uses: ./.github/workflows/nsis-tests.yml needs: - prepare-workflow @@ -58,31 +56,19 @@ <{ job_name }>: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" - <%- if prepare_actual_release %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} runs-on: - - self-hosted - - linux - - medium - - x86_64 - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ubuntu-latest - <%- endif %> + - ubuntu-22.04 + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow steps: - uses: actions/checkout@v4 - <%- if not prepare_actual_release %> - - name: Set up Python 3.10 uses: actions/setup-python@v5 with: python-version: "3.10" - <%- endif %> - - name: Setup Python Tools Scripts uses: ./.github/actions/setup-python-tools-scripts with: @@ -199,7 +185,7 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow - build-source-tarball @@ -216,11 +202,11 @@ <{ job_name }>: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow - prepare-release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -253,29 +239,27 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + name: Build Onedir Dependencies + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} <%- endif %> - <%- set job_name = "build-salt-onedir" %> <%- if includes.get(job_name, True) %> <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow - build-deps-onedir @@ -284,14 +268,12 @@ with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} <%- endif %> - <%- set job_name = "build-pkgs" %> <%- if includes.get(job_name, True) %> <%- include "build-packages.yml.jinja" %> @@ -318,7 +300,7 @@ <%- do conclusion_needs.append("combine-all-code-coverage") %> name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: PIP_INDEX_URL: https://pypi.org/simple needs: diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 2259e26bff44..94b9ec5b47a2 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -34,7 +34,7 @@ on: env: COLUMNS: 190 - CACHE_SEED: SEED-2 # Bump the number to invalidate all caches + CACHE_SEED: SEED-1 # Bump the number to invalidate all caches RELENV_DATA: "${{ github.workspace }}/.relenv" PIP_DISABLE_PIP_VERSION_CHECK: "1" RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" @@ -77,7 +77,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 <%- if prepare_workflow_if_check %> if: <{ prepare_workflow_if_check }> <%- endif %> @@ -89,10 +89,7 @@ jobs: <%- endif %> outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} - runners: ${{ steps.runner-types.outputs.runners }} changed-files: ${{ steps.process-changed-files.outputs.changed-files }} - os-labels: ${{ steps.get-pull-labels.outputs.os-labels }} - pull-labels: ${{ steps.get-pull-labels.outputs.test-labels }} testrun: ${{ steps.define-testrun.outputs.testrun }} salt-version: ${{ steps.setup-salt-version.outputs.salt-version }} cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} @@ -100,6 +97,7 @@ jobs: releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -212,14 +210,6 @@ jobs: salt-version: "<{ prepare_workflow_salt_version_input }>" validate-version: true - - name: Get Pull Request Test Labels - id: get-pull-labels - if: ${{ github.event_name == 'pull_request'}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - tools ci get-pr-test-labels --repository ${{ github.repository }} - - name: Get Hash For Nox Tarball Cache id: nox-archive-hash run: | @@ -258,11 +248,6 @@ jobs: run: | echo '${{ steps.process-changed-files.outputs.changed-files }}' | jq -C '.' - - name: Define Runner Types - id: runner-types - run: | - tools ci runner-types ${{ github.event_name }} - - name: Define Jobs To Run id: define-jobs run: | @@ -289,6 +274,13 @@ jobs: run: | tools ci define-testrun ${{ github.event_name }} changed-files.json + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config<{ prepare_workflow_skip_test_suite }><{ + prepare_workflow_skip_pkg_test_suite }><{ prepare_workflow_skip_pkg_download_test_suite + }> ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + - name: Check Contents of generated testrun-changed-files.txt if: ${{ fromJSON(steps.define-testrun.outputs.testrun)['type'] != 'full' }} run: | @@ -332,7 +324,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 <%- if workflow_slug == "nightly" %> environment: <{ workflow_slug }> <%- endif %> diff --git a/.github/workflows/templates/nightly.yml.jinja b/.github/workflows/templates/nightly.yml.jinja index 1dcc2212efeb..3bf88c07a952 100644 --- a/.github/workflows/templates/nightly.yml.jinja +++ b/.github/workflows/templates/nightly.yml.jinja @@ -56,67 +56,5 @@ concurrency: <%- block jobs %> <{- super() }> - <%- if includes.get("build-repos", True) %> - <%- include "build-repos.yml.jinja" %> - <%- endif %> - - publish-repositories: - <%- do conclusion_needs.append('publish-repositories') %> - name: Publish Repositories - if: ${{ always() && ! failure() && ! cancelled() }} - runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> - environment: <{ gh_environment }> - needs: - - prepare-workflow - - build-docs - <%- for need in build_repo_needs.iter(consume=True) %> - - <{ need }> - <%- endfor %> - <%- if workflow_slug == "nightly" %> - <%- for need in test_salt_needs.iter(consume=True) %> - - <{ need }> - <%- endfor %> - <%- endif %> - - steps: - - - uses: actions/checkout@v4 - - - 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: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - - - name: Download Repository Artifact - uses: actions/download-artifact@v4 - with: - pattern: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-repo-* - merge-multiple: true - path: repo/ - - - name: Decompress Repository Artifacts - run: | - find repo/ -type f -name '*.tar.gz' -print -exec tar xvf {} \; - find repo/ -type f -name '*.tar.gz' -print -exec rm -f {} \; - - - name: Show Repository - run: | - tree -a artifacts/pkgs/repo/ - - - name: Upload Repository Contents (<{ gh_environment }>) - env: - SALT_REPO_DOMAIN_RELEASE: ${{ vars.SALT_REPO_DOMAIN_RELEASE || 'repo.saltproject.io' }} - SALT_REPO_DOMAIN_STAGING: ${{ vars.SALT_REPO_DOMAIN_STAGING || 'staging.repo.saltproject.io' }} - run: | - tools pkg repo publish <{ gh_environment }> --salt-version=${{ needs.prepare-workflow.outputs.salt-version }} artifacts/pkgs/repo/ <%- endblock jobs %> diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index cb6d251b966c..b1b5e574afef 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -52,7 +52,7 @@ permissions: <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: <{ gh_environment }>-check steps: - name: Check For Admin Permission @@ -71,11 +71,9 @@ permissions: prepare-workflow: name: Prepare Workflow Run runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 env: - USE_S3_CACHE: 'true' + USE_S3_CACHE: 'false' environment: <{ gh_environment }> <%- if prepare_workflow_needs %> needs: @@ -89,6 +87,7 @@ permissions: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} + config: ${{ steps.workflow-config.outputs.config }} steps: - uses: actions/checkout@v4 with: @@ -147,6 +146,14 @@ permissions: run: | echo "nox-archive-hash=<{ nox_archive_hashfiles }>" | tee -a "$GITHUB_OUTPUT" + - name: Define workflow config + id: workflow-config + run: | + tools ci workflow-config<{ prepare_workflow_skip_test_suite }><{ + prepare_workflow_skip_pkg_test_suite }><{ prepare_workflow_skip_pkg_download_test_suite + }> ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json + + <%- endblock prepare_workflow_job %> <%- endif %> @@ -156,9 +163,7 @@ permissions: download-onedir-artifact: name: Download Staging Onedir Artifact runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 env: USE_S3_CACHE: 'true' environment: <{ gh_environment }> @@ -211,9 +216,7 @@ permissions: backup: name: Backup runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 needs: - prepare-workflow env: @@ -245,9 +248,7 @@ permissions: <%- do conclusion_needs.append('publish-repositories') %> name: Publish Repositories runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 env: USE_S3_CACHE: 'true' needs: @@ -277,18 +278,12 @@ permissions: run: | tools pkg repo publish <{ gh_environment }> ${{ needs.prepare-workflow.outputs.salt-version }} - <%- if includes.get("test-pkg-downloads", True) %> - <%- include "test-salt-pkg-repo-downloads.yml.jinja" %> - <%- endif %> - release: <%- do conclusion_needs.append('release') %> name: Release v${{ needs.prepare-workflow.outputs.salt-version }} if: ${{ always() && ! failure() && ! cancelled() }} runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 env: USE_S3_CACHE: 'true' needs: @@ -402,9 +397,7 @@ permissions: name: Restore Release Bucket From Backup if: ${{ always() && needs.backup.outputs.backup-complete == 'true' && (failure() || cancelled()) }} runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 env: USE_S3_CACHE: 'true' needs: @@ -445,9 +438,7 @@ permissions: - restore #} environment: <{ gh_environment }> runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - linux-x86_64 env: USE_S3_CACHE: 'true' steps: diff --git a/.github/workflows/templates/staging.yml.jinja b/.github/workflows/templates/staging.yml.jinja index a15302bc00ad..c823da809da8 100644 --- a/.github/workflows/templates/staging.yml.jinja +++ b/.github/workflows/templates/staging.yml.jinja @@ -51,9 +51,9 @@ on: <%- block concurrency %> -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.repository }} - cancel-in-progress: false +#concurrency: +# group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.repository }} +# cancel-in-progress: false <%- endblock concurrency %> @@ -65,7 +65,7 @@ concurrency: <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: <{ gh_environment }>-check steps: - name: Check For Admin Permission @@ -86,21 +86,12 @@ concurrency: needs: - prepare-workflow - build-docs - - build-src-repo environment: <{ gh_environment }> runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - ubuntu-22.04 steps: - uses: actions/checkout@v4 - - 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: Setup Python Tools Scripts uses: ./.github/actions/setup-python-tools-scripts with: @@ -112,12 +103,6 @@ concurrency: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.patch path: artifacts/release - - name: Download Source Repository - uses: actions/download-artifact@v4 - with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-<{ gh_environment }>-src-repo - path: artifacts/release - - name: Download Release Documentation (HTML) uses: actions/download-artifact@v4 with: @@ -128,34 +113,6 @@ concurrency: run: | tree -a artifacts/release - {#- - - - name: Download Release Documentation (PDF) - uses: actions/download-artifact@v4 - with: - name: Salt-${{ needs.prepare-workflow.outputs.salt-version }}.pdf - path: artifacts/release - - #} - - - name: Upload Release Artifacts - run: | - tools release upload-artifacts ${{ needs.prepare-workflow.outputs.salt-version }} artifacts/release - - - name: Upload PyPi Artifacts - uses: actions/upload-artifact@v4 - with: - name: pypi-artifacts - path: | - artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz - artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz.asc - retention-days: 7 - if-no-files-found: error - - <%- if includes.get("test-pkg-downloads", True) %> - <%- include "test-salt-pkg-repo-downloads.yml.jinja" %> - <%- endif %> - publish-pypi: <%- do conclusion_needs.append('publish-pypi') %> name: Publish to PyPi(test) @@ -174,9 +131,7 @@ concurrency: <%- endfor %> environment: <{ gh_environment }> runs-on: - - self-hosted - - linux - - repo-<{ gh_environment }> + - ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -221,4 +176,29 @@ concurrency: run: | tools pkg pypi-upload --test artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz + draft-release: + name: Draft Github Release + if: | + always() && (needs.test.result == 'success' || needs.test.result == 'skipped') && + (needs.test-packages.result == 'success' || needs.test-packages.result == 'skipped') && + needs.prepare-workflow.result == 'success' && needs.build-salt-onedir.result == 'success' && + needs.build-pkgs-onedir.result == 'success' && needs.pre-commit.result == 'success' + needs: + - prepare-workflow + - pre-commit + - build-salt-onedir + - build-pkgs-onedir + - test-packages + - test + permissions: + contents: write + pull-requests: read + id-token: write + uses: ./.github/workflows/draft-release.yml + with: + salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['artifact-matrix']) }} + build-matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }} + + <%- endblock jobs %> diff --git a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja index d547bd504dba..82c8593c59c4 100644 --- a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja @@ -6,13 +6,12 @@ <%- do conclusion_needs.append(job_name) %> name: Package Downloads <%- if gh_environment == "staging" %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg-download'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg-download'] }} <%- else %> if: ${{ inputs.skip-salt-pkg-download-test-suite == false }} <%- endif %> needs: - prepare-workflow - - publish-repositories - build-ci-deps <%- if gh_environment == "release" %> - download-onedir-artifact diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index 5feb9bf3dbed..14614ca38f9e 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -1,99 +1,18 @@ - <%- for os in test_salt_pkg_listing["linux"] %> - <%- set job_name = "{}-pkg-tests{}".format(os.slug.replace(".", ""), os.fips and '-fips' or '') %> - + <%- set job_name = "test-packages" %> <{ job_name }>: - <%- do test_salt_pkg_needs.append(job_name) %> - name: <{ os.display_name }> Package Test<%- if os.fips %> (fips)<%- endif %> - <%- if workflow_slug != "ci" or os.slug in mandatory_os_slugs %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), '<{ os.slug }>') }} - <%- endif %> + name: Test Package + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test-pkg'] }} needs: - prepare-workflow - build-pkgs-onedir - build-ci-deps - uses: ./.github/workflows/test-packages-action-linux.yml + uses: ./.github/workflows/test-packages-action.yml with: - distro-slug: <{ os.slug }> nox-session: ci-test-onedir - platform: linux - arch: <{ os.arch }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: <{ os.pkg_type }> nox-version: <{ nox_version }> python-version: "<{ gh_actions_workflows_python_version }>" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> skip-code-coverage: <{ skip_test_coverage_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - <%- if os.fips %> - fips: true - <%- endif %> - - <%- endfor %> - - - - <%- for os in test_salt_pkg_listing["macos"] %> - <%- set job_name = "{}-pkg-tests".format(os.slug.replace(".", "")) %> - - <{ job_name }>: - <%- do test_salt_pkg_needs.append(job_name) %> - name: <{ os.display_name }> Package Test - <%- if workflow_slug != "ci" or os.slug in mandatory_os_slugs %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), '<{ os.slug }>') }} - <%- endif %> - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-macos.yml - with: - distro-slug: <{ os.slug }> - runner: <{ os.runner }> - nox-session: ci-test-onedir - platform: macos - arch: <{ os.arch }> - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: macos - nox-version: <{ nox_version }> - python-version: "<{ gh_actions_workflows_python_version }>" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - skip-code-coverage: <{ skip_test_coverage_check }> - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - <%- endfor %> - - - <%- for os in test_salt_pkg_listing["windows"] %> - <%- set job_name = "{}-{}-pkg-tests".format(os.slug.replace(".", ""), os.pkg_type.lower()) %> - - <{ job_name }>: - <%- do test_salt_pkg_needs.append(job_name) %> - name: <{ os.display_name }> <{ os.pkg_type }> Package Test - <%- if workflow_slug != "ci" or os.slug in mandatory_os_slugs %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), '<{ os.slug }>') }} - <%- endif %> - needs: - - prepare-workflow - - build-pkgs-onedir - - build-ci-deps - uses: ./.github/workflows/test-packages-action-windows.yml - with: - distro-slug: <{ os.slug }> - nox-session: ci-test-onedir - platform: windows - arch: <{ os.arch }> - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - pkg-type: <{ os.pkg_type }> - nox-version: <{ nox_version }> - python-version: "<{ gh_actions_workflows_python_version }>" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - skip-code-coverage: <{ skip_test_coverage_check }> - testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} - - <%- endfor %> + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }} diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index 67d61ba3f1cd..4c63ca8eceac 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -3,99 +3,21 @@ <%- else %> <%- set timeout_value = 180 %> <%- endif %> - - <%- for os in test_salt_listing["windows"] %> - - <{ os.slug.replace(".", "") }>: - <%- do test_salt_needs.append(os.slug.replace(".", "")) %> - name: <{ os.display_name }> Test - <%- if workflow_slug != "ci" or os.slug in mandatory_os_slugs %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), '<{ os.slug }>') }} - <%- endif %> + test: + name: Test Salt + if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['test'] }} needs: - prepare-workflow - build-ci-deps - uses: ./.github/workflows/test-action-windows.yml + uses: ./.github/workflows/test-action.yml with: - distro-slug: <{ os.slug }> nox-session: ci-test-onedir - platform: windows - arch: amd64 nox-version: <{ nox_version }> - gh-actions-python-version: "<{ gh_actions_workflows_python_version }>" + python-version: "<{ gh_actions_workflows_python_version }>" testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> skip-code-coverage: <{ skip_test_coverage_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> - - <%- endfor %> - - - <%- for os in test_salt_listing["macos"] %> - - <{ os.slug.replace(".", "") }>: - <%- do test_salt_needs.append(os.slug.replace(".", "")) %> - name: <{ os.display_name }> Test - <%- if workflow_slug != "ci" or os.slug in mandatory_os_slugs %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), '<{ os.slug }>') }} - <%- endif %> - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-macos.yml - with: - distro-slug: <{ os.slug }> - runner: <{ os.runner }> - nox-session: ci-test-onedir - platform: macos - arch: <{ os.arch }> - nox-version: <{ nox_version }> - gh-actions-python-version: "<{ gh_actions_workflows_python_version }>" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - skip-code-coverage: <{ skip_test_coverage_check }> - workflow-slug: <{ workflow_slug }> - default-timeout: <{ timeout_value }> - - <%- endfor %> - - <%- for os in test_salt_listing["linux"] %> - <%- set job_name = "{}{}".format(os.slug.replace(".", ""), os.fips and '-fips' or '') %> - - <{ job_name }>: - <%- do test_salt_needs.append(job_name) %> - name: <{ os.display_name }> Test<%- if os.fips %> (fips)<%- endif %> - <%- if workflow_slug != "ci" or os.slug in mandatory_os_slugs %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - <%- else %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), '<{ os.slug }>') }} - <%- endif %> - needs: - - prepare-workflow - - build-ci-deps - uses: ./.github/workflows/test-action-linux.yml - with: - distro-slug: <{ os.slug }> - nox-session: ci-test-onedir - platform: linux - arch: <{ os.arch }> - nox-version: <{ nox_version }> - gh-actions-python-version: "<{ gh_actions_workflows_python_version }>" - testrun: ${{ needs.prepare-workflow.outputs.testrun }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - skip-code-coverage: <{ skip_test_coverage_check }> - workflow-slug: <{ workflow_slug }> - default-timeout: <{ timeout_value }> - <%- if os.fips %> - fips: true - <%- endif %> - - <%- endfor %> + matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }} diff --git a/.github/workflows/templates/trigger-branch-workflows.yml.jinja b/.github/workflows/templates/trigger-branch-workflows.yml.jinja index 9d187cd6a2d1..6efee9087a70 100644 --- a/.github/workflows/templates/trigger-branch-workflows.yml.jinja +++ b/.github/workflows/templates/trigger-branch-workflows.yml.jinja @@ -7,7 +7,7 @@ <%- do conclusion_needs.append(job_name) %> name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - workflow-requirements steps: diff --git a/.github/workflows/templates/workflow-requirements-check.yml.jinja b/.github/workflows/templates/workflow-requirements-check.yml.jinja index 67e04eef3e73..9458fe0423a0 100644 --- a/.github/workflows/templates/workflow-requirements-check.yml.jinja +++ b/.github/workflows/templates/workflow-requirements-check.yml.jinja @@ -4,7 +4,7 @@ <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Workflow Requirements - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: diff --git a/.github/workflows/test-action-linux.yml b/.github/workflows/test-action-linux.yml deleted file mode 100644 index df76d8e17985..000000000000 --- a/.github/workflows/test-action-linux.yml +++ /dev/null @@ -1,417 +0,0 @@ ---- -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 - 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: ${{ vars.PIP_INDEX_URL }} - PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} - PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} - PIP_DISABLE_PIP_VERSION_CHECK: "1" - RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" - -jobs: - - generate-matrix: - name: Test Matrix - runs-on: ubuntu-latest - outputs: - matrix-include: ${{ steps.generate-matrix.outputs.matrix }} - build-reports: ${{ steps.generate-matrix.outputs.build-reports }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - 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 }} - env: - PIP_INDEX_URL: https://pypi.org/simple - - - name: Generate Test Matrix - id: generate-matrix - run: | - tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ fromJSON(inputs.testrun)['type'] == 'full' && '--full ' || '' }}${{ 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: "Set `TIMESTAMP` environment variable" - shell: bash - run: | - echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" - - - 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@v4 - 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 nox.linux.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }} - uses: actions/download-artifact@v4 - with: - name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }} - - - name: PyPi Proxy - run: | - sed -i '7s;^;--index-url=${{ vars.PIP_INDEX_URL }} --trusted-host ${{ vars.PIP_TRUSTED_HOST }} --extra-index-url=${{ vars.PIP_EXTRA_INDEX_URL }}\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@v4 - 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 - run: | - tools --timestamps --timeout-secs=1800 vm test --skip-requirements-install --print-system-information-only \ - --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \ - ${{ matrix.tests-chunk }} - - - name: Run Changed Tests - id: run-fast-changed-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.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ - ${{ matrix.tests-chunk }} -- --core-tests --slow-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' || '' }} \ - ${{ inputs.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 ${{ inputs.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 ${{ inputs.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 ${{ inputs.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 ${{ inputs.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.fips && '.fips' || '' }}.${{ 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@v4 - with: - name: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }} - path: | - artifacts/coverage/ - include-hidden-files: true - - - name: Upload JUnit XML Test Run Artifacts - if: always() && steps.download-artifacts-from-vm.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: testrun-junit-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }} - path: | - artifacts/xml-unittests-output/ - include-hidden-files: true - - - name: Upload Test Run Log Artifacts - if: always() && steps.download-artifacts-from-vm.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: testrun-log-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }} - path: | - artifacts/logs - include-hidden-files: true - - report: - name: Test Reports - if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: ubuntu-latest - needs: - - test - - generate-matrix - env: - PIP_INDEX_URL: https://pypi.org/simple - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Merge JUnit XML Test Run Artifacts - if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-junit-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }} - pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Merge Log Test Run Artifacts - if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-log-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }} - pattern: testrun-log-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Merge Code Coverage Test Run Artifacts - if: ${{ inputs.skip-code-coverage == false }} - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }} - pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Download Code Coverage Test Run Artifacts - uses: actions/download-artifact@v4 - if: ${{ inputs.skip-code-coverage == false }} - id: download-coverage-artifacts - with: - path: artifacts/coverage/ - pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}* - merge-multiple: true - - - name: Show Downloaded Test Run Artifacts - if: ${{ inputs.skip-code-coverage == false }} - 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.fips && '..fips' || '' }}..${{ inputs.nox-session }}.xml - mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}${{ inputs.fips && '..fips' || '' }}..${{ 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.fips && '.fips' || '' }}.${{ 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@v4 - with: - name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }} - path: artifacts/coverage - include-hidden-files: true diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml deleted file mode 100644 index 56b4e482f502..000000000000 --- a/.github/workflows/test-action-macos.yml +++ /dev/null @@ -1,452 +0,0 @@ ---- -name: Test Artifact(macOS) - -on: - workflow_call: - inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against - runner: - required: true - type: string - description: The GitHub runner name - 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 - gh-actions-python-version: - required: false - type: string - description: The python version to run tests with - default: "3.11" - 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 - 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 - 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 - PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} - PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} - PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} - PIP_DISABLE_PIP_VERSION_CHECK: "1" - RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" - -jobs: - - generate-matrix: - name: Test Matrix - runs-on: ubuntu-latest - outputs: - matrix-include: ${{ steps.generate-matrix.outputs.matrix }} - build-reports: ${{ steps.generate-matrix.outputs.build-reports }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - 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 }} - env: - PIP_INDEX_URL: https://pypi.org/simple - - - name: Generate Test Matrix - id: generate-matrix - run: | - tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ inputs.distro-slug }} - - test: - name: Test - runs-on: ${{ inputs.runner }} - # 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 }} - - 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: "Set `TIMESTAMP` environment variable" - shell: bash - run: | - echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" - - - 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@v4 - 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: Install System Dependencies - run: | - brew install tree - - - name: Download nox.macos.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }} - uses: actions/download-artifact@v4 - with: - name: nox-macos-${{ inputs.arch }}-${{ inputs.nox-session }} - - - name: Set up Python ${{ inputs.gh-actions-python-version }} - uses: actions/setup-python@v5 - with: - python-version: "${{ inputs.gh-actions-python-version }}" - - - name: Install Nox - run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' - env: - PIP_INDEX_URL: https://pypi.org/simple - - - name: Decompress .nox Directory - run: | - nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }} - - - name: Download testrun-changed-files.txt - if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} - uses: actions/download-artifact@v4 - with: - name: testrun-changed-files.txt - - - name: Show System Info - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_SYSTEM_INFO_ONLY: "1" - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} - - - name: Run Changed Tests - id: run-fast-changed-tests - if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ - -k "mac or darwin" --core-tests --slow-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'] }} - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ - -k "mac or darwin" --suppress-no-test-exit-code - - - name: Run Slow Tests - id: run-slow-tests - if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ - -k "mac or darwin" --suppress-no-test-exit-code --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'] }} - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ - -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests - - - name: Run Flaky Tests - id: run-flaky-tests - if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ - -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail - - - name: Run Full Tests - id: run-full-tests - if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ - --slow-tests --core-tests -k "mac or darwin" - - - name: Fix file ownership - run: | - sudo chown -R "$(id -un)" . - - - name: Combine Coverage Reports - if: always() && inputs.skip-code-coverage == false - run: | - nox --force-color -e combine-coverage - - - name: Prepare Test Run Artifacts - id: download-artifacts-from-vm - if: always() - run: | - # 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 }} - fi - - - 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@v4 - with: - name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} - path: | - artifacts/coverage/ - include-hidden-files: true - - - name: Upload JUnit XML Test Run Artifacts - if: always() && steps.download-artifacts-from-vm.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} - path: | - artifacts/xml-unittests-output/ - include-hidden-files: true - - - name: Upload Test Run Log Artifacts - if: always() && steps.download-artifacts-from-vm.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} - path: | - artifacts/logs - include-hidden-files: true - - report: - name: Test Reports - if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: ubuntu-latest - needs: - - test - - generate-matrix - env: - PIP_INDEX_URL: https://pypi.org/simple - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Merge JUnit XML Test Run Artifacts - if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Merge Log Test Run Artifacts - if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Merge Code Coverage Test Run Artifacts - if: ${{ inputs.skip-code-coverage == false }} - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Download Code Coverage Test Run Artifacts - uses: actions/download-artifact@v4 - if: ${{ inputs.skip-code-coverage == false }} - id: download-coverage-artifacts - with: - path: artifacts/coverage/ - pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}* - merge-multiple: true - - - name: Show Downloaded Test Run Artifacts - if: ${{ inputs.skip-code-coverage == false }} - run: | - tree -a artifacts - - - name: Set up Python ${{ inputs.gh-actions-python-version }} - uses: actions/setup-python@v5 - with: - python-version: "${{ inputs.gh-actions-python-version }}" - - - 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@v4 - with: - name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }} - path: artifacts/coverage - include-hidden-files: true diff --git a/.github/workflows/test-action-windows.yml b/.github/workflows/test-action-windows.yml deleted file mode 100644 index 5f177baacbbb..000000000000 --- a/.github/workflows/test-action-windows.yml +++ /dev/null @@ -1,418 +0,0 @@ ---- -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 - 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: ${{ vars.PIP_INDEX_URL }} - PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} - PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} - PIP_DISABLE_PIP_VERSION_CHECK: "1" - RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" - -jobs: - - generate-matrix: - name: Test Matrix - runs-on: ubuntu-latest - outputs: - matrix-include: ${{ steps.generate-matrix.outputs.matrix }} - build-reports: ${{ steps.generate-matrix.outputs.build-reports }} - steps: - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - 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 }} - env: - PIP_INDEX_URL: https://pypi.org/simple - - - 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: "Set `TIMESTAMP` environment variable" - shell: bash - run: | - echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" - - - 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@v4 - 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 nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }} - uses: actions/download-artifact@v4 - with: - name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }} - - - name: PyPi Proxy - run: | - sed -i '7s;^;--index-url=${{ vars.PIP_INDEX_URL }} --trusted-host ${{ vars.PIP_TRUSTED_HOST }} --extra-index-url=${{ vars.PIP_EXTRA_INDEX_URL }}\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@v4 - 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 - run: | - tools --timestamps --timeout-secs=1800 vm test --skip-requirements-install --print-system-information-only \ - --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \ - ${{ matrix.tests-chunk }} - - - name: Run Changed Tests - id: run-fast-changed-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 ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ - ${{ matrix.tests-chunk }} -- --core-tests --slow-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@v4 - with: - name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }} - path: | - artifacts/coverage/ - include-hidden-files: true - - - name: Upload JUnit XML Test Run Artifacts - if: always() && steps.download-artifacts-from-vm.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }} - path: | - artifacts/xml-unittests-output/ - include-hidden-files: true - - - name: Upload Test Run Log Artifacts - if: always() && steps.download-artifacts-from-vm.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }} - path: | - artifacts/logs - include-hidden-files: true - - - report: - name: Test Reports - if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: ubuntu-latest - needs: - - test - - generate-matrix - env: - PIP_INDEX_URL: https://pypi.org/simple - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Merge JUnit XML Test Run Artifacts - if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Merge Log Test Run Artifacts - if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Merge Code Coverage Test Run Artifacts - if: ${{ inputs.skip-code-coverage == false }} - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-* - separate-directories: false - delete-merged: true - - - name: Download Code Coverage Test Run Artifacts - uses: actions/download-artifact@v4 - if: ${{ inputs.skip-code-coverage == false }} - id: download-coverage-artifacts - with: - path: artifacts/coverage/ - pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}* - merge-multiple: true - - - name: Show Downloaded Test Run Artifacts - if: ${{ inputs.skip-code-coverage == false }} - 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 || true - mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml || true - - - 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@v4 - with: - name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }} - path: artifacts/coverage - include-hidden-files: true diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml new file mode 100644 index 000000000000..6ce9962b14b3 --- /dev/null +++ b/.github/workflows/test-action.yml @@ -0,0 +1,851 @@ +--- +name: Test Artifact + +on: + workflow_call: + inputs: + 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 + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.11" + 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 + nox-version: + required: true + type: string + description: The nox version to install + 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 + 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 + matrix: + required: true + type: string + description: Json job matrix config + + +env: + COLUMNS: 190 + PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} + PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} + PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} + PIP_DISABLE_PIP_VERSION_CHECK: "1" + RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" + +jobs: + + test-linux: + name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}${{ matrix.fips && '--fips ' || '' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} + runs-on: + - ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }} + # 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 }} + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['linux'] }} + env: + SALT_TRANSPORT: ${{ matrix.transport }} + + steps: + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - 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: "Set `TIMESTAMP` environment variable" + shell: bash + run: | + echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" + + - 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@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.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-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz + + - name: "Pull container ${{ matrix.container }}" + run: | + docker pull ${{ matrix.container }} + + - name: "Create container ${{ matrix.container }}" + run: | + /usr/bin/docker create --name ${{ github.run_id }}_salt-test --workdir /__w/salt/salt --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" --entrypoint "/usr/lib/systemd/systemd" ${{ matrix.container }} --systemd --unit rescue.target + + - name: "Start container ${{ matrix.container }}" + run: | + /usr/bin/docker start ${{ github.run_id }}_salt-test + + - name: Download nox.linux.${{ matrix.arch }}.tar.* artifact for session ${{ inputs.nox-session }} + uses: actions/download-artifact@v4 + with: + name: nox-linux-${{ matrix.arch }}-${{ inputs.nox-session }} + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + env: + PIP_INDEX_URL: https://pypi.org/simple + + - name: Decompress .nox Directory + run: | + docker exec ${{ github.run_id}}_salt-test python3 -m nox --force-color -e decompress-dependencies -- linux ${{ matrix.arch }} + + - name: Download testrun-changed-files.txt + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + uses: actions/download-artifact@v4 + with: + name: testrun-changed-files.txt + + - name: Current Directory + run: | + pwd + + - name: Show System Info + run: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_SYSTEM_INFO_ONLY=1 ${{ github.run_id}}_salt-test \ + python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} + + - name: Run Changed Tests + id: run-fast-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + run: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_TEST_SELECTION=0 -e PRINT_TEST_PLAN_ONLY=0 -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 -e GITHUB_ACTIONS_PIPELINE=1 -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --core-tests --slow-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: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_TEST_SELECTION=0 -e PRINT_TEST_PLAN_ONLY=0 -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 -e GITHUB_ACTIONS_PIPELINE=1 -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --suppress-no-test-exit-code + + - name: Run Slow Tests + id: run-slow-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} + run: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_TEST_SELECTION=0 -e PRINT_TEST_PLAN_ONLY=0 -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 -e GITHUB_ACTIONS_PIPELINE=1 -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --suppress-no-test-exit-code --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: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_TEST_SELECTION=0 -e PRINT_TEST_PLAN_ONLY=0 -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 -e GITHUB_ACTIONS_PIPELINE=1 -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --suppress-no-test-exit-code --no-fast-tests --core-tests + + - name: Run Flaky Tests + id: run-flaky-tests + if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} + run: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_TEST_SELECTION=0 -e PRINT_TEST_PLAN_ONLY=0 -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 -e GITHUB_ACTIONS_PIPELINE=1 -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --suppress-no-test-exit-code --no-fast-tests --flaky-jail + + - name: Run Full Tests + id: run-full-tests + if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} + run: | + docker exec -e SKIP_REQUIREMENTS_INSTALL=1 -e PRINT_TEST_SELECTION=0 -e PRINT_TEST_PLAN_ONLY=0 -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 -e GITHUB_ACTIONS_PIPELINE=1 -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --slow-tests --core-tests + + - name: Fix file ownership + run: | + sudo chown -R "$(id -un)" . + + - name: Combine Coverage Reports + if: always() && inputs.skip-code-coverage == false + run: | + nox --force-color -e combine-coverage + + - name: Prepare Test Run Artifacts + id: download-artifacts-from-vm + if: always() + run: | + # Delete the salt onedir, we won't need it anymore and it will prevent + # from it showing in the tree command below + sudo rm -rf artifacts/salt* + tree -a artifacts + if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ matrix.slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }} + fi + + - 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@v4 + with: + name: testrun-coverage-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/coverage/ + include-hidden-files: true + + - name: Upload JUnit XML Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: testrun-junit-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/xml-unittests-output/ + include-hidden-files: true + + - name: Upload Test Run Log Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/logs + include-hidden-files: true + + test-macos: + name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }} + runs-on: ${{ matrix.runner }} + # Full test runs. Each chunk should never take more than 2 hours. + # Partial test runs(no chunk parallelization), 6 Hours + if: ${{ toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} + timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['macos'] }} + env: + SALT_TRANSPORT: ${{ matrix.transport }} + + 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: "Set `TIMESTAMP` environment variable" + shell: bash + run: | + echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" + + - 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@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.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-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz + + - name: Install System Dependencies + run: | + brew install tree + + - name: Download nox.macos.${{ matrix.arch }}.tar.* artifact for session ${{ inputs.nox-session }} + uses: actions/download-artifact@v4 + with: + name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + env: + PIP_INDEX_URL: https://pypi.org/simple + + - name: Decompress .nox Directory + run: | + nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }} + + - name: Download testrun-changed-files.txt + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + uses: actions/download-artifact@v4 + with: + name: testrun-changed-files.txt + + - name: Show System Info + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_SYSTEM_INFO_ONLY: "1" + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} + + - name: Run Changed Tests + id: run-fast-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + -k "mac or darwin" --core-tests --slow-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'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + -k "mac or darwin" --suppress-no-test-exit-code + + - name: Run Slow Tests + id: run-slow-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + -k "mac or darwin" --suppress-no-test-exit-code --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'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests + + - name: Run Flaky Tests + id: run-flaky-tests + if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail + + - name: Run Full Tests + id: run-full-tests + if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + --slow-tests --core-tests -k "mac or darwin" + + - name: Fix file ownership + run: | + sudo chown -R "$(id -un)" . + + - name: Combine Coverage Reports + if: always() && inputs.skip-code-coverage == false + run: | + nox --force-color -e combine-coverage + + - name: Prepare Test Run Artifacts + id: download-artifacts-from-vm + if: always() + run: | + # 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.${{ matrix.slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }} + fi + + - 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@v4 + with: + name: testrun-coverage-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/coverage/ + include-hidden-files: true + + - name: Upload JUnit XML Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: testrun-junit-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/xml-unittests-output/ + include-hidden-files: true + + - name: Upload Test Run Log Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/logs + include-hidden-files: true + + test-windows: + name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }} + if: ${{ toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} + runs-on: ${{ matrix.slug }} + # 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 }} + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['windows'] }} + env: + SALT_TRANSPORT: ${{ matrix.transport }} + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - 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: "Set `TIMESTAMP` environment variable" + shell: bash + run: | + echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" + + - 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@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.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-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz + + - name: Install System Dependencies + run: | + echo true + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + env: + PIP_INDEX_URL: https://pypi.org/simple + + - name: Download nox.windows.${{ matrix.arch }}.tar.* artifact for session ${{ inputs.nox-session }} + uses: actions/download-artifact@v4 + with: + name: nox-windows-${{ matrix.arch }}-${{ inputs.nox-session }} + + - name: Decompress .nox Directory + run: | + nox --force-color -e decompress-dependencies -- windows ${{ matrix.arch }} + + - name: Download testrun-changed-files.txt + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + uses: actions/download-artifact@v4 + with: + name: testrun-changed-files.txt + + - name: Check nox python + continue-on-error: true + run: | + .nox/ci-test-onedir/Scripts/python.exe --version + + - name: Show System Info + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_SYSTEM_INFO_ONLY: "1" + run: | + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} + + - name: Run Changed Tests + id: run-fast-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: > + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- + -k "win" --core-tests --slow-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'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: > + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- + -k "win" --suppress-no-test-exit-code + + - name: Run Slow Tests + id: run-slow-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: > + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- + -k "win" --suppress-no-test-exit-code --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'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: > + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- + -k "win" --suppress-no-test-exit-code --no-fast-tests --core-tests + + - name: Run Flaky Tests + id: run-flaky-tests + if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: > + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- + -k "win" --suppress-no-test-exit-code --no-fast-tests --flaky-jail + + - name: Run Full Tests + id: run-full-tests + if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: > + nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- + --slow-tests --core-tests -k "win" + + - name: Combine Coverage Reports + if: always() && inputs.skip-code-coverage == false + run: | + nox --force-color -e combine-coverage + + - name: Prepare Test Run Artifacts + id: download-artifacts-from-vm + if: always() + shell: bash + run: | + # 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* + if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ matrix.slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }} + fi + + - 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@v4 + with: + name: testrun-coverage-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/coverage/ + include-hidden-files: true + + - name: Upload JUnit XML Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: testrun-junit-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/xml-unittests-output/ + include-hidden-files: true + + - name: Upload Test Run Log Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v4 + with: + name: testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/logs + include-hidden-files: true + + + report: + name: Test Reports + runs-on: ubuntu-22.04 + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} + needs: + - test-linux + - test-macos + - test-windows + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['linux'] }} + env: + PIP_INDEX_URL: https://pypi.org/simple + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Merge JUnit XML Test Run Artifacts + continue-on-error: true + uses: actions/upload-artifact/merge@v4 + with: + name: testrun-junit-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }} + pattern: testrun-junit-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-* + separate-directories: false + delete-merged: true + + - name: Merge Log Test Run Artifacts + continue-on-error: true + uses: actions/upload-artifact/merge@v4 + with: + name: testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }} + pattern: testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-* + separate-directories: false + delete-merged: true + + - name: Merge Code Coverage Test Run Artifacts + if: ${{ inputs.skip-code-coverage == false }} + continue-on-error: true + uses: actions/upload-artifact/merge@v4 + with: + name: testrun-coverage-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }} + pattern: testrun-coverage-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-* + separate-directories: false + delete-merged: true + + - name: Download Code Coverage Test Run Artifacts + uses: actions/download-artifact@v4 + if: ${{ inputs.skip-code-coverage == false }} + id: download-coverage-artifacts + with: + path: artifacts/coverage/ + pattern: testrun-coverage-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}* + merge-multiple: true + + - name: Show Downloaded Test Run Artifacts + if: ${{ inputs.skip-code-coverage == false }} + run: | + tree -a artifacts + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - 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..${{ matrix.slug }}..${{ inputs.nox-session }}.xml + mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ matrix.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.${{ matrix.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@v4 + with: + name: all-testrun-coverage-artifacts-${{ matrix.slug }}.${{ inputs.nox-session }} + path: artifacts/coverage + include-hidden-files: true diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 44dacc629142..bd2453acff5f 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -88,9 +88,7 @@ jobs: needs: - generate-matrix runs-on: - - self-hosted - - linux - - bastion + - ubuntu-latest env: USE_S3_CACHE: 'true' environment: ${{ inputs.environment }} @@ -497,9 +495,7 @@ jobs: env: USE_S3_CACHE: 'true' runs-on: - - self-hosted - - linux - - bastion + - ubuntu-latest environment: ${{ inputs.environment }} timeout-minutes: 120 # 2 Hours - More than this and something is wrong strategy: diff --git a/.github/workflows/test-packages-action-linux.yml b/.github/workflows/test-packages-action-linux.yml deleted file mode 100644 index 47a5e2cdc500..000000000000 --- a/.github/workflows/test-packages-action-linux.yml +++ /dev/null @@ -1,279 +0,0 @@ -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 - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} - PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} - PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} - PIP_DISABLE_PIP_VERSION_CHECK: "1" - RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" - USE_S3_CACHE: 'true' - -jobs: - - generate-matrix: - name: Generate Matrix - runs-on: - # We need to run on our self-hosted runners because we need proper credentials - # for boto3 to scan through our repositories. - - self-hosted - - linux - - x86_64 - outputs: - pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} - build-reports: ${{ steps.generate-pkg-matrix.outputs.build-reports }} - 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.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: "Set `TIMESTAMP` environment variable" - shell: bash - run: | - echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Download Packages - uses: actions/download-artifact@v4 - 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@v4 - 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 nox.linux.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }} - uses: actions/download-artifact@v4 - with: - name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }} - - - 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: Show System Info - run: | - tools --timestamps --timeout-secs=1800 vm test --skip-requirements-install --print-system-information-only \ - --nox-session=${{ inputs.nox-session }}-pkgs ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} - - - name: Run Package Tests - run: | - tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install ${{ inputs.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@v4 - with: - name: pkg-testrun-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.pkg-type }}-${{ inputs.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}-${{ env.TIMESTAMP }} - path: | - artifacts/ - !artifacts/pkg/* - !artifacts/salt/* - !artifacts/salt-*.tar.* - include-hidden-files: true - - report: - name: Report - runs-on: ubuntu-latest - if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - needs: - - generate-matrix - - test - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Wait For Artifacts - run: | - sleep 60 - - - name: Merge Test Run Artifacts - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: pkg-testrun-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.pkg-type }} - pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.pkg-type }}-* - separate-directories: true - delete-merged: true - - - name: Wait For Artifacts 2 - run: | - sleep 60 - - - name: Download Test Run Artifacts - id: download-test-run-artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts/ - pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.pkg-type }}* - merge-multiple: true - - - - name: Show Test Run Artifacts - if: always() && steps.download-test-run-artifacts.outcome == 'success' - run: | - tree -a artifacts diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml deleted file mode 100644 index 62f775b38837..000000000000 --- a/.github/workflows/test-packages-action-macos.yml +++ /dev/null @@ -1,284 +0,0 @@ -name: Test Artifact - -on: - workflow_call: - inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against - runner: - required: true - type: string - description: The GitHub runner name - 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" - 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 - -env: - COLUMNS: 190 - PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} - PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} - PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} - PIP_DISABLE_PIP_VERSION_CHECK: "1" - RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" - -jobs: - - generate-matrix: - name: Generate Matrix - runs-on: - # We need to run on our self-hosted runners because we need proper credentials - # for boto3 to scan through our repositories. - - self-hosted - - linux - - x86_64 - outputs: - pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} - build-reports: ${{ steps.generate-pkg-matrix.outputs.build-reports }} - 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 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.distro-slug }} ${{ inputs.pkg-type }} --testing-releases ${{ join(fromJSON(inputs.testing-releases), ' ') }} - - - test: - name: Test - runs-on: ${{ inputs.runner }} - timeout-minutes: 150 # 2 & 1/2 Hours - More than this and something is wrong (MacOS needs a little more time) - 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: "Set `TIMESTAMP` environment variable" - shell: bash - run: | - echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Download Packages - uses: actions/download-artifact@v4 - with: - name: salt-${{ inputs.salt-version }}-${{ inputs.arch }}-${{ inputs.pkg-type }} - path: artifacts/pkg/ - - - name: Install System Dependencies - run: | - brew install tree - - - name: List Packages - run: | - tree artifacts/pkg/ - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v4 - 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: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 - with: - python-version: "${{ inputs.python-version }}" - - - name: Install Nox - run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' - env: - PIP_INDEX_URL: https://pypi.org/simple - - - name: Download nox.macos.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }} - uses: actions/download-artifact@v4 - with: - name: nox-macos-${{ inputs.arch }}-${{ inputs.nox-session }} - - - name: Decompress .nox Directory - run: | - nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }} - - - name: Disable Gatekeeper - run: | - sudo -E spctl --master-disable - - - name: Show System Info - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_SYSTEM_INFO_ONLY: "1" - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} - - - name: Run Package Tests - env: - SKIP_REQUIREMENTS_INSTALL: "1" - PRINT_TEST_SELECTION: "0" - PRINT_TEST_PLAN_ONLY: "0" - PRINT_SYSTEM_INFO: "0" - RERUN_FAILURES: "1" - GITHUB_ACTIONS_PIPELINE: "1" - SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" - COVERAGE_CONTEXT: ${{ inputs.distro-slug }} - run: | - sudo -E nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} \ - ${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}} - - - name: Fix file ownership - run: | - sudo chown -R "$(id -un)" . - - - name: Prepare Test Run Artifacts - id: download-artifacts-from-vm - if: always() - run: | - # 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: Upload Test Run Artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-${{ inputs.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}-${{ env.TIMESTAMP }} - path: | - artifacts/ - !artifacts/pkg/* - !artifacts/salt/* - !artifacts/salt-*.tar.* - include-hidden-files: true - - report: - name: Report - runs-on: ubuntu-latest - if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - needs: - - generate-matrix - - test - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Wait For Artifacts - run: | - sleep 60 - - - name: Merge Test Run Artifacts - continue-on-error: true - uses: actions/upload-artifact/merge@v4 - with: - name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }} - pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-* - separate-directories: true - delete-merged: true - - - name: Wait For Artifacts 2 - run: | - sleep 60 - - - name: Download Test Run Artifacts - id: download-test-run-artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts/ - pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}* - merge-multiple: true - - - name: Show Test Run Artifacts - if: always() && steps.download-test-run-artifacts.outcome == 'success' - run: | - tree -a artifacts - - - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 - with: - python-version: "${{ inputs.python-version }}" - - - name: Install Nox - run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' - env: - PIP_INDEX_URL: https://pypi.org/simple diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml deleted file mode 100644 index 310b08eefb5e..000000000000 --- a/.github/workflows/test-packages-action-windows.yml +++ /dev/null @@ -1,277 +0,0 @@ -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 - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} - PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} - PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} - PIP_DISABLE_PIP_VERSION_CHECK: "1" - RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" - -jobs: - - generate-matrix: - name: Generate Matrix - runs-on: - # We need to run on our self-hosted runners because we need proper credentials - # for boto3 to scan through our repositories. - - self-hosted - - linux - - x86_64 - outputs: - pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} - build-reports: ${{ steps.generate-pkg-matrix.outputs.build-reports }} - 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: "Set `TIMESTAMP` environment variable" - shell: bash - run: | - echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Download Packages - uses: actions/download-artifact@v4 - 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@v4 - 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 nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }} - uses: actions/download-artifact@v4 - with: - name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }} - - - 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: Show System Info - run: | - tools --timestamps --timeout-secs=1800 vm test --skip-requirements-install --print-system-information-only \ - --nox-session=${{ inputs.nox-session }}-pkgs ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} - - - 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@v4 - with: - name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-${{ inputs.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}-${{ env.TIMESTAMP }} - path: | - artifacts/ - !artifacts/pkg/* - !artifacts/salt/* - !artifacts/salt-*.tar.* - include-hidden-files: true - - report: - name: Report - runs-on: ubuntu-latest - if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - needs: - - generate-matrix - - test - - steps: - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Wait For Artifacts - run: | - sleep 60 - - - name: Merge Test Run Artifacts - uses: actions/upload-artifact/merge@v4 - continue-on-error: true - with: - name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }} - pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}-* - separate-directories: true - delete-merged: true - - - name: Wait For Artifacts 2 - run: | - sleep 60 - - - name: Download Test Run Artifacts - id: download-test-run-artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts/ - pattern: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ inputs.pkg-type }}* - merge-multiple: true - - - name: Show Test Run Artifacts - if: always() && steps.download-test-run-artifacts.outcome == 'success' - run: | - tree -a artifacts diff --git a/.github/workflows/test-packages-action.yml b/.github/workflows/test-packages-action.yml new file mode 100644 index 000000000000..1cf340e3db73 --- /dev/null +++ b/.github/workflows/test-packages-action.yml @@ -0,0 +1,500 @@ +--- +name: Test Packages + +on: + workflow_call: + inputs: + 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" + 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 + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + matrix: + required: true + type: string + description: Json job matrix config + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} + PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} + PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }} + PIP_DISABLE_PIP_VERSION_CHECK: "1" + RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1" + USE_S3_CACHE: 'false' + +jobs: + + test-linux: + name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} + runs-on: + - ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'linux-arm64' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} + timeout-minutes: 120 # 2 Hours - More than this and something is wrong + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['linux'] }} + 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: "Set `TIMESTAMP` environment variable" + shell: bash + run: | + echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Packages + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ matrix.arch }}-${{ matrix.pkg_type }} + path: artifacts/pkg/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.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-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + env: + PIP_INDEX_URL: https://pypi.org/simple + + - name: List Packages + run: | + tree artifacts/pkg/ + + - name: Download nox.linux.${{ matrix.arch }}.tar.* artifact for session ${{ inputs.nox-session }} + uses: actions/download-artifact@v4 + with: + name: nox-linux-${{ matrix.arch }}-${{ inputs.nox-session }} + + - name: "Pull container ${{ matrix.container }}" + run: | + docker pull ${{ matrix.container }} + + - name: "Create container ${{ matrix.container }}" + run: | + /usr/bin/docker create --name ${{ github.run_id }}_salt-test-pkg --workdir /__w/salt/salt --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" --entrypoint "/usr/lib/systemd/systemd" ${{ matrix.container }} --systemd --unit rescue.target + + - name: "Start container ${{ matrix.container }}" + run: | + /usr/bin/docker start ${{ github.run_id }}_salt-test-pkg + + - name: Decompress .nox Directory + run: | + docker exec ${{ github.run_id}}_salt-test-pkg python3 -m nox --force-color -e decompress-dependencies -- linux ${{ matrix.arch }} + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: List Free Space + run: | + df -h || true + + - name: Show System Info + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_SYSTEM_INFO_ONLY: "1" + run: | + docker exec ${{ github.run_id }}_salt-test-pkg python3 -m nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} + + - name: Run Package Tests + env: + SKIP_REQUIREMENTS_INSTALL: "1" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + /usr/bin/docker exec ${{ github.run_id }}_salt-test-pkg \ + python3 -m nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} \ + ${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}} + + - name: Upload Test Run Log Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: pkg-testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.pkg_type }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/logs + include-hidden-files: true + + - name: Upload Test Run Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: pkg-testrun-artifacts-${{ matrix.slug }}${{ matrix.fips && '-fips' || '' }}-${{ matrix.pkg_type }}-${{ matrix.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}-${{ env.TIMESTAMP }} + path: | + artifacts/ + !artifacts/pkg/* + !artifacts/salt/* + !artifacts/salt-*.tar.* + include-hidden-files: true + + test-macos: + name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} + runs-on: ${{ matrix.runner }} + if: ${{ toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} + timeout-minutes: 150 # 2 & 1/2 Hours - More than this and something is wrong (MacOS needs a little more time) + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['macos'] }} + 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: "Set `TIMESTAMP` environment variable" + shell: bash + run: | + echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Packages + uses: actions/download-artifact@v4 + with: + name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos + path: artifacts/pkg/ + + - name: Install System Dependencies + run: | + brew install tree + + - name: List Packages + run: | + tree artifacts/pkg/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.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-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + env: + PIP_INDEX_URL: https://pypi.org/simple + + - name: Download nox.macos.${{ matrix.arch }}.tar.* artifact for session ${{ inputs.nox-session }} + uses: actions/download-artifact@v4 + with: + name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} + + - name: Decompress .nox Directory + run: | + nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }} + + - name: Show System Info + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_SYSTEM_INFO_ONLY: "1" + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} + + - name: Run Package Tests + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + COVERAGE_CONTEXT: ${{ matrix.slug }} + run: | + sudo -E nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} \ + ${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}} + + - name: Fix file ownership + run: | + sudo chown -R "$(id -un)" . + + - name: Prepare Test Run Artifacts + id: download-artifacts-from-vm + if: always() + run: | + # 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: Upload Test Run Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: pkg-testrun-artifacts-${{ matrix.slug }}-${{ matrix.pkg_type }}-${{ matrix.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}-${{ env.TIMESTAMP }} + path: | + artifacts/ + !artifacts/pkg/* + !artifacts/salt/* + !artifacts/salt-*.tar.* + include-hidden-files: true + + + test-windows: + name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} + runs-on: ${{ matrix.slug }} + timeout-minutes: 120 # 2 Hours - More than this and something is wrong + if: ${{ toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(inputs.matrix)['windows'] }} + steps: + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: "${{ inputs.python-version }}" + + - 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: "Set `TIMESTAMP` environment variable" + shell: bash + run: | + echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Packages + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ matrix.arch }}-${{ matrix.pkg_type }} + path: ./artifacts/pkg/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.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-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + env: + PIP_INDEX_URL: https://pypi.org/simple + + - run: python3 --version + + - name: Download nox.windows.${{ matrix.arch }}.tar.* artifact for session ${{ inputs.nox-session }} + uses: actions/download-artifact@v4 + with: + name: nox-windows-${{ matrix.arch }}-${{ inputs.nox-session }} + + - name: Decompress .nox Directory + run: | + nox --force-color -e decompress-dependencies -- windows ${{ matrix.arch }} + + - name: List Important Directories + run: | + dir d:/ + dir . + dir artifacts/ + dir artifacts/pkg + dir .nox/ci-test-onedir/Scripts + + - name: Check onedir python + continue-on-error: true + run: | + artifacts/salt/Scripts/python.exe --version + + - name: Check nox python + continue-on-error: true + run: | + .nox/ci-test-onedir/Scripts/python.exe --version + + - name: Show System Info + env: + SKIP_REQUIREMENTS_INSTALL: "1" + SKIP_CODE_COVERAGE: "1" + PRINT_SYSTEM_INFO_ONLY: "1" + PYTHONUTF8: "1" + run: | + nox --force-color -f noxfile.py -e "${{ inputs.nox-session }}-pkgs" -- '${{ matrix.tests-chunk }}' --log-cli-level=debug + + - name: Run Package Tests + env: + SKIP_REQUIREMENTS_INSTALL: "1" + PRINT_TEST_SELECTION: "0" + PRINT_TEST_PLAN_ONLY: "0" + PRINT_SYSTEM_INFO: "0" + RERUN_FAILURES: "1" + GITHUB_ACTIONS_PIPELINE: "1" + SKIP_INITIAL_ONEDIR_FAILURES: "1" + SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + COVERAGE_CONTEXT: ${{ matrix.slug }} + OUTPUT_COLUMNS: "190" + PYTHONUTF8: "1" + run: > + nox --force-color -f noxfile.py -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} + ${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}} + + - name: Prepare Test Run Artifacts + id: download-artifacts-from-vm + if: always() + shell: bash + run: | + # 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* + if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ matrix.slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }} + fi + + - name: Upload Test Run Log Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: pkg-testrun-log-artifacts-${{ matrix.slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }} + path: | + artifacts/logs + include-hidden-files: true + + - name: Upload Test Run Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: pkg-testrun-artifacts-${{ matrix.slug }}-${{ matrix.pkg_type }}-${{ matrix.arch }}-${{ matrix.tests-chunk }}-${{ matrix.version || 'no-version'}}-${{ env.TIMESTAMP }} + path: | + artifacts/ + !artifacts/pkg/* + !artifacts/salt/* + !artifacts/salt-*.tar.* + include-hidden-files: true + + report: + name: Report + runs-on: ubuntu-22.04 + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} + needs: + - test-linux + - test-macos + - test-windows + strategy: + matrix: + include: ${{ fromJSON(inputs.matrix)['linux'] }} + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Wait For Artifacts + run: | + sleep 60 + + - name: Merge Test Run Artifacts + continue-on-error: true + uses: actions/upload-artifact/merge@v4 + with: + name: pkg-testrun-artifacts-${{ matrix.slug }}${{ matrix.fips && '-fips' || '' }}-${{ matrix.pkg_type }} + pattern: pkg-testrun-artifacts-${{ matrix.slug }}${{ matrix.fips && '-fips' || '' }}-${{ matrix.pkg_type }}-* + separate-directories: true + delete-merged: true + + - name: Wait For Artifacts 2 + run: | + sleep 60 + + - name: Download Test Run Artifacts + id: download-test-run-artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts/ + pattern: pkg-testrun-artifacts-${{ matrix.slug }}${{ matrix.fips && '-fips' || '' }}-${{ matrix.pkg_type }}* + merge-multiple: true + + - name: Show Test Run Artifacts + if: always() + run: | + tree -a artifacts diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68821fd8ba5d..dff763df412f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,7 +59,7 @@ repos: - id: tools alias: generate-workflows name: Generate GitHub Workflow Templates - files: ^(cicd/shared-gh-workflows-context\.yml|tools/precommit/workflows\.py|.github/workflows/.*)$ + files: ^(cicd/shared-gh-workflows-context\.yml|tools/utils/__init__.py|tools/precommit/workflows\.py|.github/workflows/.*)$ pass_filenames: false args: - pre-commit diff --git a/cicd/shared-gh-workflows-context.yml b/cicd/shared-gh-workflows-context.yml index b759400266dc..33c01baa8df6 100644 --- a/cicd/shared-gh-workflows-context.yml +++ b/cicd/shared-gh-workflows-context.yml @@ -1,10 +1,6 @@ nox_version: "2022.8.7" python_version: "3.10.15" -relenv_version: "0.17.3" +relenv_version: "0.18.0" mandatory_os_slugs: - - rockylinux-9 - - amazonlinux-2023-arm64 - - photonos-5-arm64 - - macos-12 - - ubuntu-24.04-arm64 - - windows-2022 + - ubuntu-22.04 + - ubuntu-22.04-arm64 diff --git a/noxfile.py b/noxfile.py index dff60827d70b..3d39c7438777 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1277,7 +1277,10 @@ def decompress_dependencies(session): if not os.path.isabs(resolved_link): # Relative symlinks, resolve them resolved_link = os.path.join(scan_path, resolved_link) - if not os.path.exists(resolved_link): + prefix_check = False + if platform == "windows": + prefix_check = resolved_link.startswith("\\\\?") + if not os.path.exists(resolved_link) or prefix_check: session.log("The symlink %r looks to be broken", resolved_link) # This is a broken link, fix it resolved_link_suffix = resolved_link.split( @@ -1802,13 +1805,24 @@ def ci_test_onedir_pkgs(session): session_warn(session, "Replacing VirtualEnv instance...") ci_test_onedir_path = REPO_ROOT / ".nox" / "ci-test-onedir" - session._runner.venv = VirtualEnv( - str(ci_test_onedir_path.relative_to(REPO_ROOT)), - interpreter=session._runner.func.python, - reuse_existing=True, - venv=session._runner.venv.venv_or_virtualenv == "venv", - venv_params=session._runner.venv.venv_params, - ) + if hasattr(session._runner.venv, "venv_or_virtualenv"): + venv = session._runner.venv.venv_or_virtualenv == "venv" + session._runner.venv = VirtualEnv( + str(ci_test_onedir_path.relative_to(REPO_ROOT)), + interpreter=session._runner.func.python, + reuse_existing=True, + venv=venv, + venv_params=session._runner.venv.venv_params, + ) + else: + venv = session._runner.venv.venv_backend in ("venv", "virtualenv") + session._runner.venv = VirtualEnv( # pylint: disable=unexpected-keyword-arg + str(ci_test_onedir_path.relative_to(REPO_ROOT)), + interpreter=session._runner.func.python, + reuse_existing=True, + venv_backend=session._runner.venv.venv_backend, + venv_params=session._runner.venv.venv_params, + ) os.environ["VIRTUAL_ENV"] = session._runner.venv.location session._runner.venv.create() diff --git a/pkg/windows/install_nsis.ps1 b/pkg/windows/install_nsis.ps1 index f30abdfbb9a3..9fe963e6f8d8 100644 --- a/pkg/windows/install_nsis.ps1 +++ b/pkg/windows/install_nsis.ps1 @@ -46,7 +46,7 @@ $NSIS_DIR = "${env:ProgramFiles(x86)}\NSIS" $NSIS_PLUG_A = "$NSIS_DIR\Plugins\x86-ansi" $NSIS_PLUG_U = "$NSIS_DIR\Plugins\x86-unicode" $NSIS_LIB_DIR = "$NSIS_DIR\Include" -$DEPS_URL = "https://repo.saltproject.io/windows/dependencies" +$DEPS_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/nsis" #------------------------------------------------------------------------------- # Start the Script diff --git a/pkg/windows/nsis/tests/quick_setup.ps1 b/pkg/windows/nsis/tests/quick_setup.ps1 index 454acc937c36..5dd752b96619 100644 --- a/pkg/windows/nsis/tests/quick_setup.ps1 +++ b/pkg/windows/nsis/tests/quick_setup.ps1 @@ -46,7 +46,7 @@ $WINDOWS_DIR = "$PROJECT_DIR\pkg\windows" $NSIS_DIR = "$WINDOWS_DIR\nsis" $BUILDENV_DIR = "$WINDOWS_DIR\buildenv" $NSIS_BIN = "$( ${env:ProgramFiles(x86)} )\NSIS\makensis.exe" -$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/64" +$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64/" #------------------------------------------------------------------------------- # Script Start diff --git a/pkg/windows/nsis/tests/setup.ps1 b/pkg/windows/nsis/tests/setup.ps1 index cd3307e339ee..60d095771fa8 100644 --- a/pkg/windows/nsis/tests/setup.ps1 +++ b/pkg/windows/nsis/tests/setup.ps1 @@ -46,7 +46,7 @@ $WINDOWS_DIR = "$PROJECT_DIR\pkg\windows" $NSIS_DIR = "$WINDOWS_DIR\nsis" $BUILDENV_DIR = "$WINDOWS_DIR\buildenv" $NSIS_BIN = "$( ${env:ProgramFiles(x86)} )\NSIS\makensis.exe" -$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/64" +$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64/" #------------------------------------------------------------------------------- # Script Start diff --git a/pkg/windows/prep_salt.ps1 b/pkg/windows/prep_salt.ps1 index 7bcde5b60c7b..c43707eceee9 100644 --- a/pkg/windows/prep_salt.ps1 +++ b/pkg/windows/prep_salt.ps1 @@ -74,11 +74,11 @@ $ARCH = $(. $PYTHON_BIN -c "import platform; print(platform.architectu if ( $ARCH -eq "64bit" ) { $ARCH = "AMD64" $ARCH_X = "x64" - $SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/64" + $SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64/" } else { $ARCH = "x86" $ARCH_X = "x86" - $SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/32" + $SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/32/" } #------------------------------------------------------------------------------- diff --git a/requirements/constraints.txt b/requirements/constraints.txt index d38a53d31017..cb905d01fe55 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -1,3 +1,4 @@ setuptools >= 65.6.3,< 69.0 setuptools-scm < 8.0.0 -pip >= 23.3,< 24.0 +pip >= 23.3,< 24.0 ; python_version < '3.12' +pip >24 ; python_version >= '3.12' diff --git a/salt/pillar/pillar_ldap.py b/salt/pillar/pillar_ldap.py index 9649194ad08c..2c5eab301b8a 100644 --- a/salt/pillar/pillar_ldap.py +++ b/salt/pillar/pillar_ldap.py @@ -15,7 +15,7 @@ =============================== The basic configuration is part of the `master configuration -`_. +<_master-configuration-ext-pillar>`_. .. code-block:: yaml diff --git a/salt/roster/range.py b/salt/roster/range.py index 3f039dcef427..0633d56e389e 100644 --- a/salt/roster/range.py +++ b/salt/roster/range.py @@ -24,7 +24,7 @@ HAS_RANGE = True except ImportError: - log.error("Unable to load range library") + log.warning("Unable to load range library") # pylint: enable=import-error diff --git a/tests/pytests/pkg/conftest.py b/tests/pytests/pkg/conftest.py index 258d794c89fe..f26c4a08065e 100644 --- a/tests/pytests/pkg/conftest.py +++ b/tests/pytests/pkg/conftest.py @@ -34,6 +34,16 @@ def _system_up_to_date( grains, shell, ): + gpg_dest = "/etc/apt/keyrings/salt-archive-keyring.gpg" + if os.path.exists(gpg_dest): + with salt.utils.files.fopen(gpg_dest, "r") as fp: + log.error("Salt gpg key is %s", fp.read()) + else: + log.error("Salt gpg not present") + # download_file( + # "https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public", + # gpg_dest, + # ) if grains["os_family"] == "Debian": ret = shell.run("apt", "update") assert ret.returncode == 0 diff --git a/tests/support/pkg.py b/tests/support/pkg.py index 066db28921e2..6b11aaf74632 100644 --- a/tests/support/pkg.py +++ b/tests/support/pkg.py @@ -667,11 +667,11 @@ def install_previous(self, downgrade=False): ret = self.proc.run( "rpm", "--import", - f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver}/{gpg_key}", + "https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public", ) self._check_retcode(ret) download_file( - f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver}.repo", + "https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo", f"/etc/yum.repos.d/salt-{distro_name}.repo", ) if self.distro_name == "photon": @@ -724,16 +724,13 @@ def install_previous(self, downgrade=False): if relenv: gpg_key = "SALT-PROJECT-GPG-PUBKEY-2023.gpg" download_file( - f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver}/{gpg_key}", + "https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public", f"/etc/apt/keyrings/{gpg_dest}", ) - with salt.utils.files.fopen( - pathlib.Path("/etc", "apt", "sources.list.d", "salt.list"), "w" - ) as fp: - fp.write( - f"deb [signed-by=/etc/apt/keyrings/{gpg_dest} arch={arch}] " - f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver} {self.distro_codename} main" - ) + download_file( + "https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources", + "/etc/apt/sources.list.d/salt.sources", + ) self._check_retcode(ret) cmd = [ @@ -750,7 +747,7 @@ def install_previous(self, downgrade=False): textwrap.dedent( """\ Package: salt* - Pin: origin "repo.saltproject.io" + Pin: origin "packages.broadcom.com" Pin-Priority: 1001 """ ), @@ -801,7 +798,10 @@ def install_previous(self, downgrade=False): ) elif self.file_ext == "exe": win_pkg = f"Salt-Minion-{self.prev_version}-Py3-AMD64-Setup.{self.file_ext}" - win_pkg_url = f"https://repo.saltproject.io/salt/py3/windows/{major_ver}/{win_pkg}" + win_pkg_url = ( + f"https://packages.broadcom.com/artifactory/saltproject-generic/" + f"windows/{self.prev_version}/{win_pkg}" + ) else: if self.file_ext == "msi": win_pkg = ( @@ -809,7 +809,10 @@ def install_previous(self, downgrade=False): ) elif self.file_ext == "exe": win_pkg = f"Salt-Minion-{self.prev_version}-Py3-AMD64-Setup.{self.file_ext}" - win_pkg_url = f"https://repo.saltproject.io/windows/{win_pkg}" + win_pkg_url = ( + f"https://packages.broadcom.com/artifactory/saltproject-generic/" + f"windows/{self.prev_version}/{win_pkg}" + ) pkg_path = pathlib.Path(r"C:\TEMP", win_pkg) pkg_path.parent.mkdir(exist_ok=True) download_file(win_pkg_url, pkg_path) @@ -846,14 +849,18 @@ def install_previous(self, downgrade=False): if self.classic: mac_pkg = f"salt-{self.prev_version}-py3-{arch}.pkg" - mac_pkg_url = f"https://repo.saltproject.io/osx/{mac_pkg}" + mac_pkg_url = ( + f"https://packages.broadcom.com/artifactory/saltproject-generic/" + f"macos/{self.prev_version}/{mac_pkg}" + ) else: if not relenv: mac_pkg = f"salt-{self.prev_version}-1-macos-{arch}.pkg" else: mac_pkg = f"salt-{self.prev_version}-py3-{arch}.pkg" mac_pkg_url = ( - f"https://repo.saltproject.io/salt/py3/macos/{major_ver}/{mac_pkg}" + f"https://packages.broadcom.com/artifactory/saltproject-generic/" + f"macos/{self.prev_version}/{mac_pkg}" ) mac_pkg_path = f"/tmp/{mac_pkg}" diff --git a/tests/support/win_installer.py b/tests/support/win_installer.py index b41586a6806a..a55e42d54699 100644 --- a/tests/support/win_installer.py +++ b/tests/support/win_installer.py @@ -14,7 +14,7 @@ import requests PREFIX = "Salt-Minion-" -REPO = "https://repo.saltproject.io/windows" +REPO = "https://packages.broadcom.com/artifactory/saltproject-generic/windows/" def latest_installer_name(arch="AMD64", **kwargs): diff --git a/tools/ci.py b/tools/ci.py index 3bb8ef4d72d7..0add128bed5b 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -9,34 +9,24 @@ import logging import os import pathlib +import pprint import random import shutil import sys import time -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, Literal from ptscripts import Context, command_group import tools.utils import tools.utils.gh -from tools.precommit.workflows import TEST_SALT_LISTING +from tools.precommit.workflows import TEST_SALT_LISTING, TEST_SALT_PKG_LISTING if sys.version_info < (3, 11): from typing_extensions import NotRequired, TypedDict else: from typing import NotRequired, TypedDict # pylint: disable=no-name-in-module -try: - import boto3 -except ImportError: - print( - "\nPlease run 'python -m pip install -r " - "requirements/static/ci/py{}.{}/tools.txt'\n".format(*sys.version_info), - file=sys.stderr, - flush=True, - ) - raise - log = logging.getLogger(__name__) # Define the command group @@ -152,93 +142,6 @@ def process_changed_files(ctx: Context, event_name: str, changed_files: pathlib. ctx.exit(0) -@ci.command( - name="runner-types", - arguments={ - "event_name": { - "help": "The name of the GitHub event being processed.", - }, - }, -) -def runner_types(ctx: Context, event_name: str): - """ - Set GH Actions 'runners' output to know what can run where. - """ - gh_event_path = os.environ.get("GITHUB_EVENT_PATH") or None - if gh_event_path is None: - ctx.warn("The 'GITHUB_EVENT_PATH' variable is not set.") - ctx.exit(1) - - if TYPE_CHECKING: - assert gh_event_path is not None - - github_output = os.environ.get("GITHUB_OUTPUT") - if github_output is None: - ctx.warn("The 'GITHUB_OUTPUT' variable is not set.") - ctx.exit(1) - - if TYPE_CHECKING: - assert github_output is not None - - try: - gh_event = json.loads(open(gh_event_path, encoding="utf-8").read()) - except Exception as exc: - ctx.error(f"Could not load the GH Event payload from {gh_event_path!r}:\n", exc) - ctx.exit(1) - - ctx.info("GH Event Payload:") - ctx.print(gh_event, soft_wrap=True) - # Let's it print until the end - time.sleep(1) - - ctx.info("Selecting which type of runners(self hosted runners or not) to run") - runners = {"github-hosted": False, "self-hosted": False} - if event_name == "pull_request": - ctx.info("Running from a pull request event") - pr_event_data = gh_event["pull_request"] - if ( - pr_event_data["head"]["repo"]["full_name"] - == pr_event_data["base"]["repo"]["full_name"] - ): - # If this is a pull request coming from the same repository, don't run anything - ctx.info("Pull request is coming from the same repository.") - ctx.info("Not running any jobs since they will run against the branch") - ctx.info("Writing 'runners' to the github outputs file:\n", runners) - with open(github_output, "a", encoding="utf-8") as wfh: - wfh.write(f"runners={json.dumps(runners)}\n") - ctx.exit(0) - - # This is a PR from a forked repository - ctx.info("Pull request is not comming from the same repository") - runners["github-hosted"] = runners["self-hosted"] = True - ctx.info("Writing 'runners' to the github outputs file:\n", runners) - with open(github_output, "a", encoding="utf-8") as wfh: - wfh.write(f"runners={json.dumps(runners)}\n") - ctx.exit(0) - - # This is a push or a scheduled event - ctx.info(f"Running from a {event_name!r} event") - if ( - gh_event["repository"]["fork"] is True - and os.environ.get("FORK_HAS_SELF_HOSTED_RUNNERS", "0") == "1" - ): - # This is running on a forked repository, don't run tests - ctx.info("The push event is on a forked repository") - runners["github-hosted"] = True - ctx.info("Writing 'runners' to the github outputs file:\n", runners) - with open(github_output, "a", encoding="utf-8") as wfh: - wfh.write(f"runners={json.dumps(runners)}\n") - ctx.exit(0) - - # Not running on a fork, or the fork has self hosted runners, run everything - ctx.info(f"The {event_name!r} event is from the main repository") - runners["github-hosted"] = runners["self-hosted"] = True - ctx.info("Writing 'runners' to the github outputs file:\n", runners) - with open(github_output, "a", encoding="utf-8") as wfh: - wfh.write(f"runners={json.dumps(runners)}") - ctx.exit(0) - - @ci.command( name="define-jobs", arguments={ @@ -393,6 +296,9 @@ def define_jobs( changed_files_contents["workflows"], changed_files_contents["golden_images"], } + if "test:os:all" in labels or any([_.startswith("test:os:macos") for _ in labels]): + jobs["build-deps-onedir-macos"] = True + jobs["build-salt-onedir-macos"] = True if jobs["test-pkg"] and required_pkg_test_changes == {"false"}: if "test:pkg" in labels: with open(github_step_summary, "a", encoding="utf-8") as wfh: @@ -634,6 +540,27 @@ def define_testrun(ctx: Context, event_name: str, changed_files: pathlib.Path): wfh.write(f"testrun={json.dumps(testrun)}\n") +def _build_matrix(os_kind): + """ + Generate matrix for build ci/cd steps. + """ + _matrix = [{"arch": "x86_64"}] + if os_kind == "windows": + _matrix = [ + {"arch": "amd64"}, + {"arch": "x86"}, + ] + elif os_kind == "macos": + _matrix.append({"arch": "arm64"}) + elif ( + os_kind == "linux" + and "LINUX_ARM_RUNNER" in os.environ + and os.environ["LINUX_ARM_RUNNER"] != "0" + ): + _matrix.append({"arch": "arm64"}) + return _matrix + + @ci.command( arguments={ "distro_slug": { @@ -806,6 +733,7 @@ def pkg_matrix( "tiamat": "salt/py3/macos/minor/", "relenv": "salt/py3/macos/minor/", } + name = "macos" else: parts = distro_slug.split("-") name = parts[0] @@ -818,6 +746,8 @@ def pkg_matrix( else: arch = "x86_64" + ctx.info(f"Parsed linux slug parts {name} {version} {arch}") + if name == "amazonlinux": name = "amazon" elif name == "rockylinux": @@ -837,9 +767,11 @@ def pkg_matrix( "tiamat": f"salt/py3/{name}/{version}/{arch}/minor/", "relenv": f"salt/py3/{name}/{version}/{arch}/minor/", } + _matrix = [] - s3 = boto3.client("s3") - paginator = s3.get_paginator("list_objects_v2") + # XXX: fetch versions + # s3 = boto3.client("s3") + # paginator = s3.get_paginator("list_objects_v2") _matrix = [ { "tests-chunk": "install", @@ -853,38 +785,51 @@ def pkg_matrix( if backend == "relenv" and version >= tools.utils.Version("3006.5"): prefix.replace("/arm64/", "/aarch64/") # Using a paginator allows us to list recursively and avoid the item limit - page_iterator = paginator.paginate( - Bucket=f"salt-project-{tools.utils.SPB_ENVIRONMENT}-salt-artifacts-release", - Prefix=prefix, - ) + # page_iterator = paginator.paginate( + # Bucket=f"salt-project-{tools.utils.SPB_ENVIRONMENT}-salt-artifacts-release", + # Prefix=prefix, + # ) # Uses a jmespath expression to test if the wanted version is in any of the filenames - key_filter = f"Contents[?contains(Key, '{version}')][]" - if pkg_type == "MSI": - # TODO: Add this back when we add MSI upgrade and downgrade tests - # key_filter = f"Contents[?contains(Key, '{version}')] | [?ends_with(Key, '.msi')]" - continue - elif pkg_type == "NSIS": - key_filter = ( - f"Contents[?contains(Key, '{version}')] | [?ends_with(Key, '.exe')]" - ) - continue - objects = list(page_iterator.search(key_filter)) + # key_filter = f"Contents[?contains(Key, '{version}')][]" + # if pkg_type == "MSI": + # # TODO: Add this back when we add MSI upgrade and downgrade tests + # # key_filter = f"Contents[?contains(Key, '{version}')] | [?ends_with(Key, '.msi')]" + # continue + # elif pkg_type == "NSIS": + # key_filter = ( + # f"Contents[?contains(Key, '{version}')] | [?ends_with(Key, '.exe')]" + # ) + # continue + # objects = list(page_iterator.search(key_filter)) # Testing using `any` because sometimes the paginator returns `[None]` - if any(objects): - ctx.info( - f"Found {version} ({backend}) for {distro_slug}: {objects[0]['Key']}" - ) - for session in ("upgrade", "downgrade"): - if backend == "classic": - session += "-classic" - _matrix.append( - { - "tests-chunk": session, - "version": str(version), - } - ) + # if any(objects): + # ctx.info( + # f"Found {version} ({backend}) for {distro_slug}: {objects[0]['Key']}" + # ) + # for session in ("upgrade", "downgrade"): + # if backend == "classic": + # session += "-classic" + # _matrix.append( + # { + # "tests-chunk": session, + # "version": str(version), + # } + # ) + # else: + # ctx.info(f"No {version} ({backend}) for {distro_slug} at {prefix}") + if name == "windows": + sessions = [ + "upgrade", + ] else: - ctx.info(f"No {version} ({backend}) for {distro_slug} at {prefix}") + sessions = ["upgrade", "downgrade"] + for session in sessions: + _matrix.append( + { + "tests-chunk": session, + "version": str(version), + } + ) ctx.info("Generated matrix:") if not _matrix: @@ -893,12 +838,21 @@ def pkg_matrix( for entry in _matrix: ctx.print(" * ", entry, soft_wrap=True) + # if ( + # gh_event["repository"]["fork"] is True + # and "macos" in distro_slug + # and "arm64" in distro_slug + # ): + # # XXX: This should work now + # ctx.warn("Forks don't have access to MacOS 13 Arm64. Clearning the matrix.") + # _matrix.clear() + if ( - gh_event["repository"]["fork"] is True - and "macos" in distro_slug - and "arm64" in distro_slug + arch == "arm64" + and name not in ["windows", "macos"] + and os.environ.get("LINUX_ARM_RUNNER", "0") != "0" ): - ctx.warn("Forks don't have access to MacOS 13 Arm64. Clearning the matrix.") + ctx.warn("This fork does not have a linux arm64 runner configured.") _matrix.clear() if not _matrix: @@ -944,23 +898,18 @@ def get_ci_deps_matrix(ctx: Context): _matrix = { "linux": [ - {"distro-slug": "amazonlinux-2", "arch": "x86_64"}, - {"distro-slug": "amazonlinux-2-arm64", "arch": "arm64"}, + {"arch": "x86_64"}, ], "macos": [ - {"distro-slug": "macos-12", "arch": "x86_64"}, + {"distro-slug": "macos-13", "arch": "x86_64"}, + {"distro-slug": "macos-14", "arch": "arm64"}, ], "windows": [ {"distro-slug": "windows-2022", "arch": "amd64"}, ], } - if gh_event["repository"]["fork"] is not True: - _matrix["macos"].append( - { - "distro-slug": "macos-13-arm64", - "arch": "arm64", - } - ) + if "LINUX_ARM_RUNNER" in os.environ and os.environ["LINUX_ARM_RUNNER"] != "0": + _matrix["linux"].append({"arch": "arm64"}) ctx.info("Generated matrix:") ctx.print(_matrix, soft_wrap=True) @@ -1162,7 +1111,7 @@ def get_pr_test_labels( f"The '{slug}' slug exists as a label but not as an available OS." ) selected.add(slug) - if slug != "all": + if slug != "all" and slug in available: available.remove(slug) continue test_labels.append(name) @@ -1525,3 +1474,269 @@ def upload_coverage(ctx: Context, reports_path: pathlib.Path, commit_sha: str = time.sleep(sleep_time) ctx.exit(0) + + +def _os_test_filter(osdef, transport, chunk): + """ + Filter out some test runs based on os, tranport and chunk to be run. + """ + if transport == "tcp" and chunk in ("unit", "functional"): + return False + if "macos" in osdef.slug and chunk == "scenarios": + return False + if osdef.arch == "arm64" and os.environ.get("LINUX_ARM_RUNNER", "0") == "0": + return False + if transport == "tcp" and osdef.slug not in ( + "rockylinux-9", + "rockylinux-9-arm64", + "photonos-5", + "photonos-5-arm64", + "ubuntu-22.04", + "ubuntu-22.04-arm64", + ): + return False + return True + + +@ci.command( + name="workflow-config", + arguments={ + "salt_version": { + "help": "The version of salt being tested against", + }, + "event_name": { + "help": "The name of the GitHub event being processed.", + }, + "skip_tests": { + "help": "Skip running the Salt tests", + }, + "skip_pkg_tests": { + "help": "Skip running the Salt Package tests", + }, + "skip_pkg_download_tests": { + "help": "Skip running the Salt Package download tests", + }, + "changed_files": { + "help": ( + "Path to '.json' file containing the payload of changed files " + "from the 'dorny/paths-filter' GitHub action." + ), + }, + }, +) +def workflow_config( + ctx: Context, + salt_version: str, + event_name: str, + changed_files: pathlib.Path, + skip_tests: bool = False, + skip_pkg_tests: bool = False, + skip_pkg_download_tests: bool = False, +): + full = False + gh_event_path = os.environ.get("GITHUB_EVENT_PATH") or None + gh_event = None + ctx.info(f"Github event path is {gh_event_path}") + + if event_name != "pull_request": + full = True + + if gh_event_path is None: + labels = [] + else: + try: + gh_event = json.loads(open(gh_event_path, encoding="utf-8").read()) + except Exception as exc: + ctx.error( + f"Could not load the GH Event payload from {gh_event_path!r}:\n", exc + ) + ctx.exit(1) + + if "pull_request" in gh_event: + pr = gh_event["pull_request"]["number"] + labels = _get_pr_test_labels_from_event_payload(gh_event) + else: + labels = [] + ctx.warn("The 'pull_request' key was not found on the event payload.") + + ctx.info(f"{'==== labels ====':^80s}") + ctx.info(f"{pprint.pformat(labels)}") + ctx.info(f"{'==== end labels ====':^80s}") + + ctx.info(f"{'==== github event ====':^80s}") + ctx.info(f"{pprint.pformat(gh_event)}") + ctx.info(f"{'==== end github event ====':^80s}") + + config: dict[str, Any] = {} + jobs = { + "lint": True, + "test": True, + "test-pkg": True, + "test-pkg-download": True, + "prepare-release": True, + "build-docs": True, + "build-source-tarball": True, + "build-deps-onedir": True, + "build-salt-onedir": True, + "build-pkgs": True, + "build-deps-ci": True, + } + + platforms: list[Literal["linux", "macos", "windows"]] = [ + "linux", + "macos", + "windows", + ] + + if skip_pkg_download_tests: + jobs["test-pkg-download"] = False + + config["jobs"] = jobs + config["build-matrix"] = { + platform: _build_matrix(platform) for platform in platforms + } + ctx.info(f"{'==== build matrix ====':^80s}") + ctx.info(f"{pprint.pformat(config['build-matrix'])}") + ctx.info(f"{'==== end build matrix ====':^80s}") + config["artifact-matrix"] = [] + for platform in platforms: + config["artifact-matrix"] += [ + dict({"platform": platform}, **_) for _ in config["build-matrix"][platform] + ] + ctx.info(f"{'==== artifact matrix ====':^80s}") + ctx.info(f"{pprint.pformat(config['artifact-matrix'])}") + ctx.info(f"{'==== end artifact matrix ====':^80s}") + + # Get salt releases. + releases = tools.utils.get_salt_releases(ctx) + str_releases = [str(version) for version in releases] + latest = str_releases[-1] + + # Get testing releases. + parsed_salt_version = tools.utils.Version(salt_version) + # We want the latest 4 major versions, removing the oldest if this version is a new major + num_major_versions = 4 + if parsed_salt_version.minor == 0: + num_major_versions = 3 + majors = sorted( + list( + { + # We aren't testing upgrades from anything before 3006.0 + # and we don't want to test 3007.? on the 3006.x branch + version.major + for version in releases + if version.major > 3005 and version.major <= parsed_salt_version.major + } + ) + )[-num_major_versions:] + testing_releases = [] + # Append the latest minor for each major + for major in majors: + minors_of_major = [version for version in releases if version.major == major] + testing_releases.append(minors_of_major[-1]) + str_releases = [str(version) for version in testing_releases] + ctx.info(f"str_releases {str_releases}") + + pkg_test_matrix: dict[str, list] = {_: [] for _ in platforms} + + if os.environ.get("LINUX_ARM_RUNNER", "0") == "0": + TEST_SALT_LISTING["linux"] = list( + filter(lambda x: x.arch != "arm64", TEST_SALT_LISTING["linux"]) + ) + TEST_SALT_PKG_LISTING["linux"] = list( + filter(lambda x: x.arch != "arm64", TEST_SALT_PKG_LISTING["linux"]) + ) + if not skip_pkg_tests: + for platform in platforms: + pkg_test_matrix[platform] = [ + dict( + { + "tests-chunk": "install", + "version": None, + }, + **_.as_dict(), + ) + for _ in TEST_SALT_PKG_LISTING[platform] + ] + for version in str_releases: + for platform in platforms: + pkg_test_matrix[platform] += [ + dict( + { + "tests-chunk": "upgrade", + "version": version, + }, + **_.as_dict(), + ) + for _ in TEST_SALT_PKG_LISTING[platform] + ] + pkg_test_matrix[platform] += [ + dict( + { + "tests-chunk": "downgrade", + "version": version, + }, + **_.as_dict(), + ) + for _ in TEST_SALT_PKG_LISTING[platform] + ] + ctx.info(f"{'==== pkg test matrix ====':^80s}") + ctx.info(f"{pprint.pformat(pkg_test_matrix)}") + ctx.info(f"{'==== end pkg test matrix ====':^80s}") + + _splits = { + "functional": 4, + "integration": 7, + "scenarios": 1, + "unit": 4, + } + + test_matrix: dict[str, list] = {_: [] for _ in platforms} + if not skip_tests: + for platform in platforms: + for transport in ("zeromq", "tcp"): + for chunk in ("unit", "functional", "integration", "scenarios"): + splits = _splits.get(chunk) or 1 + if full and splits > 1: + for split in range(1, splits + 1): + test_matrix[platform] += [ + dict( + { + "transport": transport, + "tests-chunk": chunk, + "test-group": split, + "test-group-count": splits, + }, + **_.as_dict(), + ) + for _ in TEST_SALT_LISTING[platform] + if _os_test_filter(_, transport, chunk) + ] + else: + test_matrix[platform] += [ + dict( + {"transport": transport, "tests-chunk": chunk}, + **_.as_dict(), + ) + for _ in TEST_SALT_LISTING[platform] + if _os_test_filter(_, transport, chunk) + ] + ctx.info(f"{'==== test matrix ====':^80s}") + ctx.info(f"{pprint.pformat(test_matrix)}") + ctx.info(f"{'==== end test matrix ====':^80s}") + config["pkg-test-matrix"] = pkg_test_matrix + config["test-matrix"] = test_matrix + ctx.info("Jobs selected are") + for x, y in jobs.items(): + ctx.info(f"{x} = {y}") + github_step_summary = os.environ.get("GITHUB_STEP_SUMMARY") + if github_step_summary is not None: + with open(github_step_summary, "a", encoding="utf-8") as wfh: + wfh.write("Selected Jobs:\n") + for name, value in sorted(jobs.items()): + wfh.write(f" - `{name}`: {value}\n") + github_output = os.environ.get("GITHUB_OUTPUT") + if github_output is not None: + with open(github_output, "a", encoding="utf-8") as wfh: + wfh.write(f"config={json.dumps(config)}\n") + ctx.exit(0) diff --git a/tools/precommit/workflows.py b/tools/precommit/workflows.py index b60371aa80cb..9bb72a3cfda3 100644 --- a/tools/precommit/workflows.py +++ b/tools/precommit/workflows.py @@ -13,125 +13,437 @@ from ptscripts import Context, command_group import tools.utils -from tools.utils import Linux, MacOS, PlatformDefinitions, Windows +from tools.utils import ( + Linux, + LinuxPkg, + MacOS, + MacOSPkg, + PlatformDefinitions, + Windows, + WindowsPkg, +) log = logging.getLogger(__name__) WORKFLOWS = tools.utils.REPO_ROOT / ".github" / "workflows" TEMPLATES = WORKFLOWS / "templates" +# Define the command group +cgroup = command_group( + name="workflows", + help="Pre-Commit GH Actions Workflows Related Commands", + description=__doc__, + parent="pre-commit", +) + +# Testing platforms TEST_SALT_LISTING = PlatformDefinitions( { "linux": [ - Linux(slug="rockylinux-8", display_name="Rocky Linux 8", arch="x86_64"), + Linux( + slug="rockylinux-8", + display_name="Rocky Linux 8", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-8", + ), Linux( slug="rockylinux-8-arm64", display_name="Rocky Linux 8 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-8", + ), + Linux( + slug="rockylinux-9", + display_name="Rocky Linux 9", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-9", ), - Linux(slug="rockylinux-9", display_name="Rocky Linux 9", arch="x86_64"), Linux( slug="rockylinux-9-arm64", display_name="Rocky Linux 9 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-9", + ), + Linux( + slug="amazonlinux-2", + display_name="Amazon Linux 2", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2", ), - Linux(slug="amazonlinux-2", display_name="Amazon Linux 2", arch="x86_64"), Linux( slug="amazonlinux-2-arm64", display_name="Amazon Linux 2 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2", ), Linux( slug="amazonlinux-2023", display_name="Amazon Linux 2023", arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2023", ), Linux( slug="amazonlinux-2023-arm64", display_name="Amazon Linux 2023 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2023", ), - Linux(slug="debian-11", display_name="Debian 11", arch="x86_64"), - Linux(slug="debian-11-arm64", display_name="Debian 11 Arm64", arch="arm64"), - Linux(slug="debian-12", display_name="Debian 12", arch="x86_64"), - Linux(slug="debian-12-arm64", display_name="Debian 12 Arm64", arch="arm64"), - Linux(slug="fedora-40", display_name="Fedora 40", arch="x86_64"), - Linux(slug="opensuse-15", display_name="Opensuse 15", arch="x86_64"), - Linux(slug="photonos-4", display_name="Photon OS 4", arch="x86_64"), Linux( - slug="photonos-4-arm64", display_name="Photon OS 4 Arm64", arch="arm64" + slug="debian-11", + display_name="Debian 11", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-11", + ), + Linux( + slug="debian-11-arm64", + display_name="Debian 11 Arm64", + arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-11", + ), + Linux( + slug="debian-12", + display_name="Debian 12", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-12", + ), + Linux( + slug="debian-12-arm64", + display_name="Debian 12 Arm64", + arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-12", + ), + Linux( + slug="fedora-40", + display_name="Fedora 40", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:fedora-40", + ), + # Linux(slug="opensuse-15", display_name="Opensuse 15", arch="x86_64"), + Linux( + slug="photonos-4", + display_name="Photon OS 4", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", + ), + Linux( + slug="photonos-4-arm64", + display_name="Photon OS 4 Arm64", + arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", ), Linux( slug="photonos-4", display_name="Photon OS 4", arch="x86_64", fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", ), Linux( slug="photonos-4-arm64", display_name="Photon OS 4 Arm64", arch="arm64", fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", ), - Linux(slug="photonos-5", display_name="Photon OS 5", arch="x86_64"), Linux( - slug="photonos-5-arm64", display_name="Photon OS 5 Arm64", arch="arm64" + slug="photonos-5", + display_name="Photon OS 5", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", + ), + Linux( + slug="photonos-5-arm64", + display_name="Photon OS 5 Arm64", + arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", ), Linux( slug="photonos-5", display_name="Photon OS 5", arch="x86_64", fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", ), Linux( slug="photonos-5-arm64", display_name="Photon OS 5 Arm64", arch="arm64", fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", + ), + Linux( + slug="ubuntu-20.04", + display_name="Ubuntu 20.04", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-20.04", ), - Linux(slug="ubuntu-20.04", display_name="Ubuntu 20.04", arch="x86_64"), Linux( slug="ubuntu-20.04-arm64", display_name="Ubuntu 20.04 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-20.04", + ), + Linux( + slug="ubuntu-22.04", + display_name="Ubuntu 22.04", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04", ), - Linux(slug="ubuntu-22.04", display_name="Ubuntu 22.04", arch="x86_64"), Linux( slug="ubuntu-22.04-arm64", display_name="Ubuntu 22.04 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04", + ), + Linux( + slug="ubuntu-24.04", + display_name="Ubuntu 24.04", + arch="x86_64", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-24.04", ), - Linux(slug="ubuntu-24.04", display_name="Ubuntu 24.04", arch="x86_64"), Linux( slug="ubuntu-24.04-arm64", display_name="Ubuntu 24.04 Arm64", arch="arm64", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-24.04", ), ], "macos": [ MacOS(slug="macos-12", display_name="macOS 12", arch="x86_64"), MacOS(slug="macos-13", display_name="macOS 13", arch="x86_64"), - MacOS( - slug="macos-13-arm64", - display_name="macOS 13 Arm64", - arch="arm64", - runner="macos-13-xlarge", - ), + MacOS(slug="macos-14", display_name="macOS 14 (M1)", arch="arm64"), + MacOS(slug="macos-15", display_name="macOS 15 (M1)", arch="arm64"), ], "windows": [ - Windows(slug="windows-2016", display_name="Windows 2016", arch="amd64"), + # Windows(slug="windows-2016", display_name="Windows 2016", arch="amd64"), Windows(slug="windows-2019", display_name="Windows 2019", arch="amd64"), Windows(slug="windows-2022", display_name="Windows 2022", arch="amd64"), ], } ) - -# Define the command group -cgroup = command_group( - name="workflows", - help="Pre-Commit GH Actions Workflows Related Commands", - description=__doc__, - parent="pre-commit", +TEST_SALT_PKG_LISTING = PlatformDefinitions( + { + "linux": [ + LinuxPkg( + slug="rockylinux-8", + display_name="Rocky Linux 8", + arch="x86_64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-8", + ), + LinuxPkg( + slug="rockylinux-8-arm64", + display_name="Rocky Linux 8 Arm64", + arch="arm64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-8", + ), + LinuxPkg( + slug="rockylinux-9", + display_name="Rocky Linux 9", + arch="x86_64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-9", + ), + LinuxPkg( + slug="rockylinux-9-arm64", + display_name="Rocky Linux 9 Arm64", + arch="arm64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:rockylinux-9", + ), + LinuxPkg( + slug="amazonlinux-2", + display_name="Amazon Linux 2", + arch="x86_64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2", + ), + LinuxPkg( + slug="amazonlinux-2-arm64", + display_name="Amazon Linux 2 Arm64", + arch="arm64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2", + ), + LinuxPkg( + slug="amazonlinux-2023", + display_name="Amazon Linux 2023", + arch="x86_64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2023", + ), + LinuxPkg( + slug="amazonlinux-2023-arm64", + display_name="Amazon Linux 2023 Arm64", + arch="arm64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:amazonlinux-2023", + ), + LinuxPkg( + slug="debian-11", + display_name="Debian 11", + arch="x86_64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-11", + ), + LinuxPkg( + slug="debian-11-arm64", + display_name="Debian 11 Arm64", + arch="arm64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-11", + ), + LinuxPkg( + slug="debian-12", + display_name="Debian 12", + arch="x86_64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-12", + ), + LinuxPkg( + slug="debian-12-arm64", + display_name="Debian 12 Arm64", + arch="arm64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:debian-12", + ), + LinuxPkg( + slug="photonos-4", + display_name="Photon OS 4", + arch="x86_64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", + ), + LinuxPkg( + slug="photonos-4-arm64", + display_name="Photon OS 4 Arm64", + arch="arm64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", + ), + LinuxPkg( + slug="photonos-4", + display_name="Photon OS 4", + arch="x86_64", + pkg_type="rpm", + fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", + ), + LinuxPkg( + slug="photonos-4-arm64", + display_name="Photon OS 4 Arm64", + arch="arm64", + pkg_type="rpm", + fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-4", + ), + LinuxPkg( + slug="photonos-5", + display_name="Photon OS 5", + arch="x86_64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", + ), + LinuxPkg( + slug="photonos-5-arm64", + display_name="Photon OS 5 Arm64", + arch="arm64", + pkg_type="rpm", + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", + ), + LinuxPkg( + slug="photonos-5", + display_name="Photon OS 5", + arch="x86_64", + pkg_type="rpm", + fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", + ), + LinuxPkg( + slug="photonos-5-arm64", + display_name="Photon OS 5 Arm64", + arch="arm64", + pkg_type="rpm", + fips=True, + container="ghcr.io/saltstack/salt-ci-containers/testing:photon-5", + ), + LinuxPkg( + slug="ubuntu-20.04", + display_name="Ubuntu 20.04", + arch="x86_64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-20.04", + ), + LinuxPkg( + slug="ubuntu-20.04-arm64", + display_name="Ubuntu 20.04 Arm64", + arch="arm64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-20.04", + ), + LinuxPkg( + slug="ubuntu-22.04", + display_name="Ubuntu 22.04", + arch="x86_64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04", + ), + LinuxPkg( + slug="ubuntu-22.04-arm64", + display_name="Ubuntu 22.04 Arm64", + arch="arm64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04", + ), + LinuxPkg( + slug="ubuntu-24.04", + display_name="Ubuntu 24.04", + arch="x86_64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-24.04", + ), + LinuxPkg( + slug="ubuntu-24.04-arm64", + display_name="Ubuntu 24.04 Arm64", + arch="arm64", + pkg_type="deb", + container="ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-24.04", + ), + ], + "macos": [ + MacOSPkg(slug="macos-12", display_name="macOS 12", arch="x86_64"), + MacOSPkg(slug="macos-13", display_name="macOS 13", arch="x86_64"), + MacOSPkg(slug="macos-14", display_name="macOS 14 (M1)", arch="arm64"), + MacOSPkg(slug="macos-15", display_name="macOS 15 (M1)", arch="arm64"), + ], + "windows": [ + WindowsPkg( + slug="windows-2019", + display_name="Windows 2019", + arch="amd64", + pkg_type="NSIS", + ), + WindowsPkg( + slug="windows-2019", + display_name="Windows 2019", + arch="amd64", + pkg_type="MSI", + ), + WindowsPkg( + slug="windows-2022", + display_name="Windows 2022", + arch="amd64", + pkg_type="NSIS", + ), + WindowsPkg( + slug="windows-2022", + display_name="Windows 2022", + arch="amd64", + pkg_type="MSI", + ), + ], + } ) @@ -191,221 +503,7 @@ def generate_workflows(ctx: Context): }, }, } - - test_salt_pkg_listing = PlatformDefinitions( - { - "linux": [ - Linux( - slug="rockylinux-8", - display_name="Rocky Linux 8", - arch="x86_64", - pkg_type="rpm", - ), - Linux( - slug="rockylinux-8-arm64", - display_name="Rocky Linux 8 Arm64", - arch="arm64", - pkg_type="rpm", - ), - Linux( - slug="rockylinux-9", - display_name="Rocky Linux 9", - arch="x86_64", - pkg_type="rpm", - ), - Linux( - slug="rockylinux-9-arm64", - display_name="Rocky Linux 9 Arm64", - arch="arm64", - pkg_type="rpm", - ), - Linux( - slug="amazonlinux-2", - display_name="Amazon Linux 2", - arch="x86_64", - pkg_type="rpm", - ), - Linux( - slug="amazonlinux-2-arm64", - display_name="Amazon Linux 2 Arm64", - arch="arm64", - pkg_type="rpm", - ), - Linux( - slug="amazonlinux-2023", - display_name="Amazon Linux 2023", - arch="x86_64", - pkg_type="rpm", - ), - Linux( - slug="amazonlinux-2023-arm64", - display_name="Amazon Linux 2023 Arm64", - arch="arm64", - pkg_type="rpm", - ), - Linux( - slug="debian-11", - display_name="Debian 11", - arch="x86_64", - pkg_type="deb", - ), - Linux( - slug="debian-11-arm64", - display_name="Debian 11 Arm64", - arch="arm64", - pkg_type="deb", - ), - Linux( - slug="debian-12", - display_name="Debian 12", - arch="x86_64", - pkg_type="deb", - ), - Linux( - slug="debian-12-arm64", - display_name="Debian 12 Arm64", - arch="arm64", - pkg_type="deb", - ), - Linux( - slug="photonos-4", - display_name="Photon OS 4", - arch="x86_64", - pkg_type="rpm", - ), - Linux( - slug="photonos-4-arm64", - display_name="Photon OS 4 Arm64", - arch="arm64", - pkg_type="rpm", - ), - Linux( - slug="photonos-4", - display_name="Photon OS 4", - arch="x86_64", - pkg_type="rpm", - fips=True, - ), - Linux( - slug="photonos-4-arm64", - display_name="Photon OS 4 Arm64", - arch="arm64", - pkg_type="rpm", - fips=True, - ), - Linux( - slug="photonos-5", - display_name="Photon OS 5", - arch="x86_64", - pkg_type="rpm", - ), - Linux( - slug="photonos-5-arm64", - display_name="Photon OS 5 Arm64", - arch="arm64", - pkg_type="rpm", - ), - Linux( - slug="photonos-5", - display_name="Photon OS 5", - arch="x86_64", - pkg_type="rpm", - fips=True, - ), - Linux( - slug="photonos-5-arm64", - display_name="Photon OS 5 Arm64", - arch="arm64", - pkg_type="rpm", - fips=True, - ), - Linux( - slug="ubuntu-20.04", - display_name="Ubuntu 20.04", - arch="x86_64", - pkg_type="deb", - ), - Linux( - slug="ubuntu-20.04-arm64", - display_name="Ubuntu 20.04 Arm64", - arch="arm64", - pkg_type="deb", - ), - Linux( - slug="ubuntu-22.04", - display_name="Ubuntu 22.04", - arch="x86_64", - pkg_type="deb", - ), - Linux( - slug="ubuntu-22.04-arm64", - display_name="Ubuntu 22.04 Arm64", - arch="arm64", - pkg_type="deb", - ), - Linux( - slug="ubuntu-24.04", - display_name="Ubuntu 24.04", - arch="x86_64", - pkg_type="deb", - ), - Linux( - slug="ubuntu-24.04-arm64", - display_name="Ubuntu 24.04 Arm64", - arch="arm64", - pkg_type="deb", - ), - ], - "macos": [ - MacOS(slug="macos-12", display_name="macOS 12", arch="x86_64"), - MacOS(slug="macos-13", display_name="macOS 13", arch="x86_64"), - MacOS( - slug="macos-13-arm64", - display_name="macOS 13 Arm64", - arch="arm64", - runner="macos-13-xlarge", - ), - ], - "windows": [ - Windows( - slug="windows-2016", - display_name="Windows 2016", - arch="amd64", - pkg_type="NSIS", - ), - Windows( - slug="windows-2016", - display_name="Windows 2016", - arch="amd64", - pkg_type="MSI", - ), - Windows( - slug="windows-2019", - display_name="Windows 2019", - arch="amd64", - pkg_type="NSIS", - ), - Windows( - slug="windows-2019", - display_name="Windows 2019", - arch="amd64", - pkg_type="MSI", - ), - Windows( - slug="windows-2022", - display_name="Windows 2022", - arch="amd64", - pkg_type="NSIS", - ), - Windows( - slug="windows-2022", - display_name="Windows 2022", - arch="amd64", - pkg_type="MSI", - ), - ], - } - ) + test_salt_pkg_listing = TEST_SALT_PKG_LISTING build_rpms_listing = [] rpm_os_versions: dict[str, list[str]] = { @@ -474,6 +572,9 @@ def generate_workflows(ctx: Context): "includes": includes, "conclusion_needs": NeedsTracker(), "test_salt_needs": NeedsTracker(), + "test_salt_linux_needs": NeedsTracker(), + "test_salt_macos_needs": NeedsTracker(), + "test_salt_windows_needs": NeedsTracker(), "test_salt_pkg_needs": NeedsTracker(), "test_repo_needs": NeedsTracker(), "prepare_workflow_needs": NeedsTracker(), diff --git a/tools/utils/__init__.py b/tools/utils/__init__.py index 7588a183eefa..89edf57dbe41 100644 --- a/tools/utils/__init__.py +++ b/tools/utils/__init__.py @@ -67,6 +67,31 @@ def _get_default_arch(self): class Linux(OS): platform: str = attr.ib(default="linux") fips: bool = attr.ib(default=False) + container: str = attr.ib(default=None) + + @property + def job_name(self): + return f"test-{ self.slug.replace('.', '') }{'-fips' if self.fips else ''}" + + def as_dict(self): + return { + "platform": self.platform, + "slug": self.slug, + "arch": self.arch, + "display_name": self.display_name, + "pkg_type": self.pkg_type, + "fips": self.fips, + "container": self.container, + "job_name": self.job_name, + } + + +@attr.s(frozen=True, slots=True) +class LinuxPkg(Linux): + + @property + def job_name(self): + return f"test-pkg-{ self.slug.replace('.', '') }{ '-fips' if self.fips else ''}" @attr.s(frozen=True, slots=True) @@ -78,6 +103,29 @@ class MacOS(OS): def _default_runner(self): return self.slug + @property + def job_name(self): + return f"test-{ self.slug.replace('.', '') }" + + def as_dict(self): + return { + "platform": self.platform, + "slug": self.slug, + "arch": self.arch, + "display_name": self.display_name, + "pkg_type": self.pkg_type, + "runner": self.runner, + "job_name": self.job_name, + } + + +@attr.s(frozen=True, slots=True) +class MacOSPkg(MacOS): + + @property + def job_name(self): + return f"test-pkg-{ self.slug.replace('.', '') }" + @attr.s(frozen=True, slots=True) class Windows(OS): @@ -86,6 +134,28 @@ class Windows(OS): def _get_default_arch(self): return "amd64" + @property + def job_name(self): + return f"test-{ self.slug.replace('.', '') }" + + def as_dict(self): + return { + "platform": self.platform, + "slug": self.slug, + "arch": self.arch, + "display_name": self.display_name, + "pkg_type": self.pkg_type, + "job_name": self.job_name, + } + + +@attr.s(frozen=True, slots=True) +class WindowsPkg(Windows): + + @property + def job_name(self): + return f"test-pkg-{ self.slug.replace('.', '') }-{ self.pkg_type.lower() }" + class PlatformDefinitions(TypedDict): linux: list[Linux] @@ -183,7 +253,9 @@ def __hash__(self): return hash(str(self)) -def get_salt_releases(ctx: Context, repository: str) -> list[Version]: +def get_salt_releases( + ctx: Context, repository: str = "saltstack/salt" +) -> list[Version]: """ Return a list of salt versions """