Skip to content

Commit

Permalink
Initial multi-platform install CI
Browse files Browse the repository at this point in the history
  • Loading branch information
j0yu committed Apr 27, 2020
1 parent 56ba56c commit 7e59c29
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Installation
on: [push]

jobs:
os-vm:
name: ${{ matrix.python-version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
python-version:
- '2.7'
# - '3.6'
# - '3.7'
os:
- windows
- macos
include:
- os: windows
method: 'python .\install.py "C:\Program Files\rez"'
check-parent: 'dir "C:\Program Files"'
- os: macos
method: 'sudo python ./install.py /Applications/Utilities/rez'
check-parent: 'ls -lah /Applications/Utilities'

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- run: ${{ matrix.check-parent }}
- run: ${{ matrix.method }}

linux-vm:
name: ${{ matrix.python-version }} - ${{ matrix.method }}
runs-on: ubuntu-latest
needs: os-vm # Disable while we test above
strategy:
matrix:
python-version:
- '2.7'
- '3.6'
- '3.7'
method:
- 'python ./install.py'
- 'pip install --target /opt/rez .'
include:
- method: 'python ./install.py'
exports: 'PATH=${PATH}:/opt/rez/bin/rez'
- method: 'pip install --target /opt/rez .'
exports: 'PATH=${PATH}:/opt/rez/bin PYTHONPATH=${PYTHONPATH}:/opt/rez'

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install
run: |
${{ matrix.method }}
find /opt/rez/ -maxdepth 2
- name: rez status
run: |
export ${{ matrix.exports }}
rez status
- name: rez-pip --install .
run: |
export ${{ matrix.exports }}
rez-pip --install .
rez view rez
- name: Import rez package in Python
run: |
export ${{ matrix.exports }}
# Still needed as there's no fallback to use system's python
rez bind python
echo "Checking rez as python package: ==========================================="
rez env rez -- python -c 'import rez;print(rez.__file__)'

0 comments on commit 7e59c29

Please sign in to comment.