Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 4, 2024
1 parent fc49e71 commit 51f1186
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-deps-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ jobs:
if: ${{ inputs.kind == 'windows' }}
env:
USE_S3_CACHE: 'false'
GITHUB_WORKSPACE: 'C:\Windows\Temp\testing'
timeout-minutes: 90
strategy:
fail-fast: false
Expand Down Expand Up @@ -312,6 +313,7 @@ jobs:
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
cd artifacts
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz
- name: Set up Python ${{ inputs.python-version }}
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
Expand Down
68 changes: 40 additions & 28 deletions .github/workflows/test-packages-action-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,17 @@ jobs:

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: |
Expand All @@ -134,24 +140,13 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ inputs.arch }}-${{ inputs.pkg-type }}
path: artifacts/pkg/
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: 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
path: ./artifacts/

- name: Decompress Onedir Tarball
shell: bash
Expand All @@ -160,9 +155,13 @@ jobs:
cd artifacts
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
- name: List Packages
- name: Install Nox
run: |
tree artifacts/pkg/
python3 -m pip install 'nox==${{ inputs.nox-version }}'
env:
PIP_INDEX_URL: https://pypi.org/simple

- run: python3 --version

- name: Download nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
uses: actions/download-artifact@v4
Expand All @@ -171,27 +170,40 @@ jobs:

- name: Decompress .nox Directory
run: |
nox --force-color -e decompress-dependencies -- windows ${{ inputs.arch }}
7z.exe x nox.windows.${{ inputs.arch }}.tar.gz -od:/a/salt/salt
- name: Find and remove pyc files
shell: bash
run: |
find . -name '*.pyc' -delete
find .nox -name '*.pyc' -delete
- name: Rename salt directory
run: ren ./salt ./salt-bak
- name: List Packages
run: |
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
- run: Get-Item .nox/ci-test-onedir/Scripts/python.exe | Select-Object -ExpandProperty Target

- 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_TEST_SELECTION: "0"
PRINT_TEST_PLAN_ONLY: "0"
PRINT_SYSTEM_INFO_ONLY: "1"
SKIP_INITIAL_ONEDIR_FAILURES: "1"
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "1"
OUTPUT_COLUMNS: "190"
GITHUB_ACTIONS_PIPELINE: "1"
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
TOOLS_DISTRO_SLUG: "${{ inputs.distro-slug }}"
PYTHONUTF8: "1"
run: |
nox --force-color -f noxfile.py -e "${{ inputs.nox-session }}-pkgs" -- '${{ matrix.tests-chunk }}'
nox --force-color -f noxfile.py -e "${{ inputs.nox-session }}-pkgs" -- '${{ matrix.tests-chunk }}' --log-cli-level=debug
- name: Run Package Tests
env:
Expand Down
2 changes: 1 addition & 1 deletion pkg/windows/nsis/tests/quick_setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/windows/nsis/tests/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51f1186

Please sign in to comment.