Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows CI upgrade #1185

Merged
merged 34 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4d4901e
experimental changes to windows workflows
nerdvegas Dec 21, 2021
5740959
-use correct choco bin
nerdvegas Dec 21, 2021
c859c92
-aded verbosity
nerdvegas Dec 21, 2021
288a1f5
added missing quotes
nerdvegas Dec 21, 2021
d32a884
-colored txt testing
nerdvegas Dec 21, 2021
ef53981
more testing for better output in windows workflow
nerdvegas Dec 21, 2021
9a2670e
-echo indication of missing image, but not as error
nerdvegas Dec 21, 2021
861f778
echo not working
nerdvegas Dec 22, 2021
8589adf
-ignore workflow changes for triggering most workflows
nerdvegas Dec 22, 2021
0052d10
trying out SilentlyContinue
nerdvegas Dec 22, 2021
c026979
SilentlyContinue is bulshit, reverting
nerdvegas Dec 22, 2021
d8e5eea
better path incl/excl in workflows
nerdvegas Dec 22, 2021
cdec18b
force win-dock-img workflow run
nerdvegas Dec 22, 2021
bc4f938
force windows workflow run
nerdvegas Dec 22, 2021
2675236
win img not tagged as latest, fix
nerdvegas Dec 22, 2021
68d7553
using ::set-output to embed img tag into artifact name
nerdvegas Dec 22, 2021
afc8849
-formatting cleanup
nerdvegas Dec 22, 2021
e60ce5f
add commit hash rev to py image artifact name
nerdvegas Dec 22, 2021
50af0d2
force windows workflow run
nerdvegas Dec 22, 2021
3e69279
-split windows workflow into pull/run steps
nerdvegas Dec 22, 2021
f99200f
attempt #2 at showing tagged img name
nerdvegas Dec 22, 2021
2f4dfd2
yet another attempt at showing img tag info in workflow output
nerdvegas Dec 23, 2021
fc380e3
fixed typo in workflow
nerdvegas Dec 23, 2021
6b34822
ENV usage fix in dockerfile
nerdvegas Dec 23, 2021
b9fff9c
https://stackoverflow.com/questions/50452860/error-response-from-daem…
nerdvegas Dec 23, 2021
7d68ba8
force windows workflow run
nerdvegas Dec 23, 2021
5aff96b
-test trigger of win-img and win workflow at same time
nerdvegas Dec 23, 2021
e65c37e
force windows run, just validating that correct image is used
nerdvegas Dec 23, 2021
7c7344e
use pytest in windows rez-selftest run
nerdvegas Dec 23, 2021
e4644ec
force windows run
nerdvegas Dec 23, 2021
cb571aa
set correct master branch restriction in win-docker-img workflow
nerdvegas Dec 24, 2021
f87374b
exclude data files from flake8 workflow trigger
nerdvegas Dec 24, 2021
63ddafd
better path exclusion for flake8 workflow
nerdvegas Jan 15, 2022
8ec3798
paste fix
nerdvegas Jan 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/docker/rez-win-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ ARG PWSH_VERSION=6.2.2
# - PowerShellCore
#
ENV chocolateyUseWindowsCompression false
RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); `
choco feature disable --name showDownloadProgress; `
choco install git.install --yes --version=${ENV:GIT_VERSION}; `
RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); `
choco feature disable --name showDownloadProgress; `
choco install git.install --yes --version=${ENV:GIT_VERSION}; `
choco install cmake --yes --version=${ENV:CMAKE_VERSION} --installargs 'ADD_CMAKE_TO_PATH=System'; `
choco install pwsh --yes --version=${PWSH_VERSION}; `
choco install --yes choco-cleaner; `
C:\ProgramData\chocolatey\bin\choco-cleaner.ps1; `
choco install pwsh --yes --version=${PWSH_VERSION}; `
choco install --yes choco-cleaner; `
C:\ProgramData\chocolatey\bin\choco-cleaner.bat; `
choco uninstall --yes choco-cleaner

ENTRYPOINT ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "ByPass"]
34 changes: 19 additions & 15 deletions .github/docker/rez-win-py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ ARG BASE_TAG
# Base image windows version
FROM rez-win-base:$BASE_TAG

# Tag applied to this image
ARG PY_TAG
ENV _PY_TAG=$PY_TAG

# NOTE: Any " requires \" in the Dockerfile for windows.
# NOTE: The order matters. ARG after the shell command will allow access via
# the PowerShell environment like ${ENV:PYTHON_VERSION}.
Expand All @@ -23,27 +27,27 @@ ARG PYTHON_VERSION
# Python 2.x uses msi while 3.x has an exe with separate arguments
# Verifies the installation by running python explicitly and via `python`
#
RUN ${PYTHON_INSTALL_PATH} = 'C:\Python'; `
${PYTHON_MAJOR_VERSION} = ${ENV:PYTHON_VERSION}.Split('.')[0]; `
if (${PYTHON_MAJOR_VERSION} -eq "2") { `
${INSTALLARGS} = \"'/qn /norestart ADDLOCAL=ALL ALLUSERS=1 TARGETDIR=`\"\" + ${PYTHON_INSTALL_PATH} + \"`\"'\"; `
} else { `
${INSTALLARGS} = \"'/quiet InstallAllUsers=1 PrependPath=1 TargetDir=`\"\" + ${PYTHON_INSTALL_PATH} + \"`\"'\"; `
} `
choco install python${PYTHON_MAJOR_VERSION} --yes --version=\"${ENV:PYTHON_VERSION}\" --override --installargs=${INSTALLARGS}; `
RUN ${PYTHON_INSTALL_PATH} = 'C:\Python'; `
${PYTHON_MAJOR_VERSION} = ${ENV:PYTHON_VERSION}.Split('.')[0]; `
if (${PYTHON_MAJOR_VERSION} -eq "2") { `
${INSTALLARGS} = \"'/qn /norestart ADDLOCAL=ALL ALLUSERS=1 TARGETDIR=`\"\" + ${PYTHON_INSTALL_PATH} + \"`\"'\"; `
} else { `
${INSTALLARGS} = \"'/quiet InstallAllUsers=1 PrependPath=1 TargetDir=`\"\" + ${PYTHON_INSTALL_PATH} + \"`\"'\"; `
} `
choco install python${PYTHON_MAJOR_VERSION} --yes --version=\"${ENV:PYTHON_VERSION}\" --override --installargs=${INSTALLARGS}; `
if (-not $?) {exit 1};

# ------------------------------------------------------------------------------------------------------------
# Verify Python
#
RUN $python_relative_ver = (& python --version 2>&1).ToString().Trim().Split(" ")[1]; `
$python_explicit_ver = (& C:\python\python.exe --version 2>&1).ToString().Trim().Split(" ")[1]; `
if (-not $?) {exit 1}; `
$python_relative_ver = (& python --version 2>&1).ToString().Trim().Split(" ")[1]; `
$python_explicit_ver = (& C:\python\python.exe --version 2>&1).ToString().Trim().Split(" ")[1]; `
RUN $python_relative_ver = (& python --version 2>&1).ToString().Trim().Split(" ")[1]; `
$python_explicit_ver = (& C:\python\python.exe --version 2>&1).ToString().Trim().Split(" ")[1]; `
if (-not $?) {exit 1}; `
$python_relative_ver = (& python --version 2>&1).ToString().Trim().Split(" ")[1]; `
$python_explicit_ver = (& C:\python\python.exe --version 2>&1).ToString().Trim().Split(" ")[1]; `
if (-not ($python_explicit_ver -eq $python_relative_ver -and $python_explicit_ver -eq ${ENV:PYTHON_VERSION})) {exit 1}; `
choco install --yes choco-cleaner; `
C:\ProgramData\chocolatey\bin\choco-cleaner.ps1; `
choco install --yes choco-cleaner; `
C:\ProgramData\chocolatey\bin\choco-cleaner.bat; `
choco uninstall --yes choco-cleaner

COPY entrypoint.ps1 /entrypoint.ps1
Expand Down
9 changes: 9 additions & 0 deletions .github/docker/rez-win-py/entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ $ErrorActionPreference = "Stop"
#
${ENV:PYTHONIOENCODING} = "UTF-8"

# Print name of image being run, for debugging purposes. We can't show the
# literal image name here, because it just uses 'latest' tagged image (see
# explanation in windows-docker-image.yaml - on.push)
#
Write-Output "Using docker image rez-win-py:${ENV:_PY_TAG}"

# Verify Python
#
python --version
Expand All @@ -34,6 +40,9 @@ mkdir build
python .\checkout\install.py build
if (-not $?) {exit 1}

# Install pytest for better rez-selftest output
.\build\Scripts\rez\rez-python -m pip install pytest-cov

# Run Rez Tests
#
.\build\Scripts\rez\rez-selftest.exe
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@
name: core
on:
pull_request:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/core.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/core.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'

jobs:
main:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: flake8
on:
pull_request:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- 'data/**'
- '**.md'
paths:
- 'src/rez/**.py'
- 'src/rezplugins/**.py'
- '.github/workflows/flake8.yaml'
- '!src/rez/utils/_version.py'
- '!src/rez/data/**'
- '!src/rez/vendor/**'
- '!src/rez/backport/**'
push:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- 'data/**'
- '**.md'
paths:
- 'src/rez/**.py'
- 'src/rezplugins/**.py'
- '.github/workflows/flake8.yaml'
- '!src/rez/utils/_version.py'
- '!src/rez/data/**'
- '!src/rez/vendor/**'
- '!src/rez/backport/**'

jobs:
lint:
Expand All @@ -40,11 +40,11 @@ jobs:
- name: Run flake8
run: >-
find -name '*.py'
-not -path './build_utils/*'
-not -path './rez/vendor/*'
-not -path './rez/data/*'
-not -path './support/*'
-not -path './rez/backport/*'
-not -path './build_utils/*'
-not -path './support/*'
-not -path './rezgui/*'
| xargs flake8
working-directory: src
10 changes: 5 additions & 5 deletions .github/workflows/installation.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: installation
on:
push:
paths-ignore:
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/installation.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'

jobs:
main:
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/mac.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: mac
on:
pull_request:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/mac.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/mac.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'

jobs:
main:
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: ubuntu
on:
pull_request:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/ubuntu.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths-ignore:
- '.github/docker/**'
- '.github/workflows/windows-docker-image.yaml'
- 'src/rez/utils/_version.py'
- 'wiki/**'
- 'metrics/**'
- '**.md'
paths:
- 'src/**'
- '.github/workflows/ubuntu.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'

jobs:
main:
Expand Down
Loading