-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
def7a10
commit 8a0a922
Showing
5 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: build_test_linux | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build_test_linux: | ||
name: ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["pypy-3.11", | ||
"pypy-3.10", | ||
"3.11", | ||
"3.10" | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup py-${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Caching improves build time, we use pythonLocation to cache everything including wheels to avoid building | ||
# wheels at each build (pandas/Pypy is extremely time consuming) | ||
# sed replacement is performed to rectify PyPy path which ends with /bin | ||
# cache key takes into account the Python version of the runner to avoid version mismatch on updates. | ||
- name: Get pip cache path | ||
id: get-pip-path | ||
run: | | ||
id=$(echo ${{ env.pythonLocation }} | sed 's/\/bin//g') | ||
echo "::set-output name=id::$id" | ||
- name: Pip cache | ||
uses: actions/cache@v3 | ||
id: pip-cache | ||
with: | ||
path: ${{ steps.get-pip-path.outputs.id }} | ||
key: ${{ steps.get-pip-path.outputs.id }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | ||
|
||
- name: Install requirements | ||
if: steps.pip-cache.outputs.cache-hit != 'true' | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
- name: Build | ||
run: | | ||
python -m pip install . | ||
- name: Test | ||
if: startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.python-version, '3.10') | ||
run: | | ||
python -m pytest tests.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: build_test_macos | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build_test_macos: | ||
name: ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["macos-12"] | ||
python-version: ["pypy-3.11", | ||
"pypy-3.10", | ||
"3.11", | ||
"3.10" | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup py-${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Caching improves build time, we use pythonLocation to cache everything including wheels to avoid building | ||
# wheels at each build (pandas/Pypy is extremely time consuming) | ||
# sed replacement is performed to rectify PyPy path which ends with /bin | ||
# cache key takes into account the Python version of the runner to avoid version mismatch on updates. | ||
- name: Get pip cache path | ||
id: get-pip-path | ||
run: | | ||
id=$(echo ${{ env.pythonLocation }} | sed 's/\/bin//g') | ||
echo "::set-output name=id::$id" | ||
- name: Pip cache | ||
uses: actions/cache@v3 | ||
id: pip-cache | ||
with: | ||
path: ${{ steps.get-pip-path.outputs.id }} | ||
key: ${{ steps.get-pip-path.outputs.id }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | ||
|
||
- name: Install requirements | ||
if: steps.pip-cache.outputs.cache-hit != 'true' | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
- name: Build | ||
run: | | ||
python -m pip install . | ||
- name: Test | ||
# On other versions then 3.9, we test only. (without coverage generation) | ||
if: startsWith(matrix.os, 'macos') && !startsWith(matrix.python-version, '3.9') && !startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
python -m pytest tests.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: build_test_windows | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build_test_windows: | ||
name: ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["windows-latest"] | ||
python-version: ["pypy-3.11", | ||
"pypy-3.10", | ||
"3.11", | ||
"3.10" | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup py-${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup msys2 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW64 | ||
update: true | ||
install: git unzip mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-zlib mingw-w64-x86_64-libtiff mingw-w64-x86_64-freetype mingw-w64-x86_64-lcms2 mingw-w64-x86_64-libwebp mingw-w64-x86_64-openjpeg2 mingw-w64-x86_64-libimagequant mingw-w64-x86_64-libraqm mingw-w64-x86_64-gcc mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-pip mingw-w64-x86_64-python3-setuptools | ||
|
||
- name: Install requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
- name: Build | ||
env: | ||
MSYSTEM: MINGW64 | ||
MSYS2_PATH: D:/a/_temp/msys64 | ||
run: | | ||
python -m pip install . | ||
- name: Test | ||
# On other versions then 3.9, we test only. (without coverage generation) | ||
if: startsWith(matrix.os, 'windows') && !startsWith(matrix.python-version, '3.9') && !startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
python -m pytest tests.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ torch | |
setuptools | ||
redis | ||
mpi4py | ||
pytest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pytest | ||
|
||
# currently default test to make pipeline happy | ||
def test_source_parameter(): | ||
assert True | ||
|