-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Tanveen Bharaj <[email protected]>
- Loading branch information
1 parent
44862bf
commit af3f8b1
Showing
2 changed files
with
56 additions
and
86 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 |
---|---|---|
|
@@ -69,116 +69,69 @@ jobs: | |
env: | ||
WHITESOURCE_API_KEY: ${{ secrets.WHITESOURCE_API_KEY }} | ||
|
||
build-manylinux: | ||
build: | ||
needs: lint | ||
name: Build linux-py${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
container: quay.io/pypa/manylinux2010_x86_64 | ||
strategy: | ||
matrix: | ||
os: | ||
- image: ubuntu-20.04 | ||
id: manylinux_x86_64 | ||
- image: ubuntu-20.04 | ||
id: manylinux_aarch64 | ||
- image: windows-2019 | ||
id: win_amd64 | ||
- image: macos-10.15 | ||
id: macosx_x86_64 | ||
- image: macos-10.15 | ||
id: macosx_arm64 | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
exclude: | ||
- os: | ||
id: macosx_arm64 | ||
python-version: 3.7 | ||
name: Build ${{ matrix.os.id }}-py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os.image }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Updating path | ||
run: | | ||
echo "/opt/python/cp37-cp37m/bin/" >> $GITHUB_PATH | ||
echo "/opt/python/cp38-cp38/bin/" >> $GITHUB_PATH | ||
echo "/opt/python/cp39-cp39/bin/" >> $GITHUB_PATH | ||
echo "/opt/python/cp310-cp310/bin/" >> $GITHUB_PATH | ||
- name: Display Python version | ||
run: python${{ matrix.python-version }} -c "import sys; print(sys.version)" | ||
- name: Upgrade setuptools, pip, wheel and build | ||
run: python${{ matrix.python-version }} -m pip install -U setuptools pip wheel build | ||
- name: Generate wheel | ||
run: python${{ matrix.python-version }} -m build --wheel --outdir dist_tmp . | ||
- name: Run auditwheel | ||
run: auditwheel repair --plat manylinux2014_x86_64 -L connector dist_tmp/snowflake_connector_python*.whl -w dist | ||
- name: Show wheels generated | ||
run: ls -lh dist | ||
- uses: actions/upload-artifact@v1 | ||
- name: Set shortver | ||
run: echo "shortver=${longver//./}" >> $GITHUB_ENV | ||
env: | ||
longver: ${{ matrix.python-version }} | ||
shell: bash | ||
- name: Set up QEMU | ||
if: ${{ matrix.os.id == 'manylinux_aarch64' }} | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
name: linux_py${{ matrix.python-version }} | ||
path: dist/ | ||
|
||
build-macos: | ||
needs: lint | ||
name: Build macos-py${{ matrix.python.version }} | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python: | ||
- version: "3.7" | ||
link: https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg | ||
- version: "3.8" | ||
link: https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg | ||
- version: "3.9" | ||
link: https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg | ||
- version: "3.10" | ||
link: https://www.python.org/ftp/python/3.10.0/python-3.10.0post2-macos11.pkg | ||
steps: | ||
platforms: all | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
run: | | ||
curl "${{ matrix.python.link }}" -o python.pkg | ||
sudo installer -pkg python.pkg -target / | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
python3 get-pip.py | ||
- name: Display Python version | ||
run: python3 -c "import sys; print(sys.version)" | ||
- name: Upgrade setuptools, pip, wheel and build | ||
run: python3 -m pip install -U setuptools pip wheel build | ||
- name: Generate wheel | ||
run: python3 -m build --wheel . | ||
- name: Building wheel | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: cp${{ env.shortver }}-${{ matrix.os.id }} | ||
MACOSX_DEPLOYMENT_TARGET: 10.14 # Should be kept in sync with ci/build_darwin.sh | ||
- name: Show wheels generated | ||
run: ls -lh dist/ | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: macos_py${{ matrix.python.version }} | ||
path: dist/ | ||
|
||
build-windows: | ||
needs: lint | ||
name: Build windows-py${{ matrix.python-version }} | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
- name: Upgrade setuptools, pip, wheel and build | ||
run: python -m pip install -U setuptools pip wheel build | ||
- name: Generate wheel | ||
run: python -m build --wheel . | ||
output-dir: dist | ||
- name: Show wheels generated | ||
run: ls -lh dist | ||
shell: bash | ||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: windows_py${{ matrix.python-version }} | ||
name: ${{ matrix.os.id }}_py${{ matrix.python-version }} | ||
path: dist/ | ||
|
||
test: | ||
name: Test ${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }} | ||
needs: [build-manylinux, build-macos, build-windows] | ||
needs: build | ||
runs-on: ${{ matrix.os.image_name }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- image_name: ubuntu-latest | ||
download_name: linux | ||
download_name: manylinux_x86_64 | ||
- image_name: macos-latest | ||
download_name: macos | ||
download_name: macosx_x86_64 | ||
- image_name: windows-2019 | ||
download_name: windows | ||
download_name: win_amd64 | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
cloud-provider: [aws, azure, gcp] | ||
steps: | ||
|
@@ -267,7 +220,7 @@ jobs: | |
|
||
test-fips: | ||
name: Test FIPS linux-3.7-${{ matrix.cloud-provider }} | ||
needs: build-manylinux | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -285,7 +238,7 @@ jobs: | |
- name: Download wheel(s) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: linux_py3.7 | ||
name: manylinux_x86_64_py3.7 | ||
path: dist | ||
- name: Show wheels downloaded | ||
run: ls -lh dist | ||
|
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