powershell: fix prepend for new variables and fix unsetenv for non-existing variables #638
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: installation | |
on: | |
pull_request: | |
paths: | |
- 'src/**' | |
- '.github/workflows/installation.yaml' | |
- '!src/rez/utils/_version.py' | |
- '!**.md' | |
push: | |
paths: | |
- 'src/**' | |
- '.github/workflows/installation.yaml' | |
- '!src/rez/utils/_version.py' | |
- '!**.md' | |
workflow_dispatch: | |
jobs: | |
main: | |
name: ${{ matrix.os }} - ${{ matrix.python-version }} - ${{ matrix.method }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-2019 | |
python-version: | |
- '2.7' | |
- '3.7' | |
method: | |
- 'install' | |
- 'pip' | |
include: | |
# ubuntu | |
- os: ubuntu-latest | |
method: install | |
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:/opt/rez/bin/rez' | |
REZ_INSTALL_COMMAND: 'python ./install.py /opt/rez' | |
- os: ubuntu-latest | |
method: pip | |
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:/opt/rez/bin PYTHONPATH=${PYTHONPATH}:/opt/rez' | |
REZ_INSTALL_COMMAND: 'pip install --target /opt/rez .' | |
# macOS | |
- os: macOS-latest | |
method: install | |
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:~/rez/bin/rez' | |
REZ_INSTALL_COMMAND: 'python ./install.py ~/rez' | |
- os: macOS-latest | |
method: pip | |
REZ_SET_PATH_COMMAND: 'export PATH="$PATH:~/rez/bin" PYTHONPATH=$PYTHONPATH:$HOME/rez' | |
REZ_INSTALL_COMMAND: 'pip install --target ~/rez .' | |
# windows | |
- os: windows-2019 | |
method: install | |
REZ_SET_PATH_COMMAND: '$env:PATH="$env:PATH;C:\ProgramData\rez\Scripts\rez"' | |
REZ_INSTALL_COMMAND: 'python ./install.py C:\ProgramData\rez' | |
- os: windows-2019 | |
method: pip | |
REZ_SET_PATH_COMMAND: '[System.Environment]::SetEnvironmentVariable("PATH","$env:PATH;C:\ProgramData\rez\bin"); $env:PYTHONPATH="$env:PYTHONPATH;C:\ProgramData\rez"' | |
REZ_INSTALL_COMMAND: 'pip install --target C:\ProgramData\rez .' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: | | |
${{ matrix.REZ_INSTALL_COMMAND }} | |
- name: Run rez-status | |
run: | | |
${{ matrix.REZ_SET_PATH_COMMAND }} | |
rez-status | |
- name: Install rez with rez-pip | |
run: | | |
${{ matrix.REZ_SET_PATH_COMMAND }} | |
rez-pip --install . |