-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Build scripts updated - setup.py: Handle version string from GITHUB_REF - Adjust some deprecated code - Although disabled in CI, conda-build was migrated to boa/mamba, and conda-forge is used since Python 3.10 is somewhat broken in the oficial conda repos. Still too slow to build on every commit. - An older macOS SDK is used to avoid some linker issues. - LICENSE: updated to 2022 - README.md: replace badges
- Loading branch information
Showing
27 changed files
with
269 additions
and
384 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,175 @@ | ||
name: Builds | ||
|
||
# TODO: generalize steps | ||
|
||
env: | ||
DSS_CAPI_TAG: 0.12.0a1 | ||
ARTIFACTS_FOLDER: '${{ github.workspace }}/artifacts' | ||
|
||
on: | ||
# release: | ||
# types: [created] | ||
push: | ||
|
||
jobs: | ||
build_linux_x64: | ||
name: 'Linux x64' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: 'docker://pmeira/manylinux_wheel_fpc322_x86_64' | ||
env: | ||
CONDA_SUBDIR: 'linux-64' | ||
DSS_CAPI_PATH: '${{ github.workspace }}/dss_capi' | ||
CONDA: "/opt/miniconda/" | ||
steps: | ||
- name: 'Checkout' | ||
run: | | ||
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python | ||
cd dss_python | ||
git checkout $GITHUB_SHA | ||
- name: 'Download/extract DSS C-API binaries' | ||
run: | | ||
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/dss_capi_${DSS_CAPI_TAG}_linux_x64.tar.gz -o dss_capi.tar.gz | ||
tar zxf dss_capi.tar.gz | ||
- name: Build wheel | ||
run: | | ||
mkdir -p artifacts | ||
mkdir -p artifacts_raw | ||
bash dss_python/ci/build_linux.sh x64 | ||
# - name: Build conda packages | ||
# continue-on-error: true | ||
# run: | | ||
# bash dss_python/ci/build_conda.sh | ||
- name: 'Upload artifacts' | ||
uses: "actions/upload-artifact@v2" | ||
with: | ||
name: 'packages' | ||
path: '${{ github.workspace }}/artifacts' | ||
|
||
build_linux_x86: | ||
name: 'Linux x86' | ||
runs-on: ubuntu-latest | ||
env: | ||
CONDA_SUBDIR: 'linux-32' | ||
DOCKER_IMAGE: 'pmeira/manylinux_wheel_fpc322_i686' | ||
steps: | ||
- name: 'Checkout' | ||
run: | | ||
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python | ||
cd dss_python | ||
git checkout $GITHUB_SHA | ||
- name: 'Setup Docker' | ||
run: | | ||
docker pull $DOCKER_IMAGE | ||
- name: 'Download/extract DSS C-API binaries' | ||
run: | | ||
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/dss_capi_${DSS_CAPI_TAG}_linux_x86.tar.gz -o dss_capi.tar.gz | ||
tar zxf dss_capi.tar.gz | ||
- name: Build wheel | ||
run: | | ||
mkdir -p artifacts | ||
mkdir -p artifacts_raw | ||
docker run -e GITHUB_SHA -e GITHUB_REF -e DSS_CAPI_PATH=/build/dss_capi -v "${PWD}:/build" -w /build $DOCKER_IMAGE bash /build/dss_python/ci/build_linux.sh x86 | ||
- name: 'Upload artifacts' | ||
uses: "actions/upload-artifact@v2" | ||
with: | ||
name: 'packages' | ||
path: '${{ github.workspace }}/artifacts' | ||
|
||
build_macos_x64: | ||
name: 'macOS x64' | ||
runs-on: 'macos-10.15' | ||
env: | ||
DSS_CAPI_PATH: '${{ github.workspace }}/dss_capi' | ||
SDKROOT: '${{ github.workspace }}/MacOSX10.13.sdk' | ||
PYTHON: python3 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
path: 'dss_python' | ||
- name: 'Download/extract DSS C-API binaries' | ||
run: | | ||
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/dss_capi_${DSS_CAPI_TAG}_darwin_x64.tar.gz -o dss_capi.tar.gz | ||
tar zxf dss_capi.tar.gz | ||
- name: 'Download macOS SDK 10.13' | ||
run: | | ||
curl -s -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz -o macOSsdk.tar.xz | ||
tar xf macOSsdk.tar.xz | ||
- name: Build wheel | ||
run: | | ||
bash dss_python/ci/build_wheel.sh | ||
# - name: Build conda packages | ||
# continue-on-error: true | ||
# run: | | ||
# sudo chown -R $UID $CONDA | ||
# bash dss_python/ci/build_conda.sh | ||
- name: 'Upload artifacts' | ||
uses: "actions/upload-artifact@v2" | ||
with: | ||
name: 'packages' | ||
path: '${{ github.workspace }}/artifacts' | ||
|
||
build_win_x64: | ||
name: 'Windows x64' | ||
runs-on: windows-2019 | ||
env: | ||
CONDA_SUBDIR: 'win-64' | ||
DSS_CAPI_PATH: '${{ github.workspace }}\dss_capi' | ||
PYTHON: python | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
path: 'dss_python' | ||
- name: 'Download/extract DSS C-API binaries' | ||
shell: cmd | ||
run: | | ||
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://github.com/dss-extensions/dss_capi/releases/download/%DSS_CAPI_TAG%/dss_capi_%DSS_CAPI_TAG%_win_x64.zip -o dss_capi.zip | ||
7z x -y -o. dss_capi.zip | ||
- name: Build wheel | ||
shell: bash | ||
run: | | ||
bash dss_python/ci/build_wheel.sh | ||
# - name: Build conda packages | ||
# continue-on-error: true | ||
# shell: bash | ||
# run: | | ||
# bash dss_python/ci/build_conda.sh | ||
- name: 'Upload artifacts' | ||
uses: "actions/upload-artifact@v2" | ||
with: | ||
name: 'packages' | ||
path: '${{ github.workspace }}/artifacts' | ||
|
||
build_win_x86: | ||
name: 'Windows x86' | ||
runs-on: windows-2019 | ||
env: | ||
CONDA_SUBDIR: 'win-32' | ||
DSS_CAPI_PATH: '${{ github.workspace }}\dss_capi' | ||
PYTHON: python | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
path: 'dss_python' | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
architecture: 'x86' | ||
- name: 'Download/extract DSS C-API binaries' | ||
shell: cmd | ||
run: | | ||
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://github.com/dss-extensions/dss_capi/releases/download/%DSS_CAPI_TAG%/dss_capi_%DSS_CAPI_TAG%_win_x86.zip -o dss_capi.zip | ||
7z x -y -o. dss_capi.zip | ||
- name: Build wheel | ||
shell: bash | ||
run: | | ||
bash dss_python/ci/build_wheel.sh | ||
- name: 'Upload artifacts' | ||
uses: "actions/upload-artifact@v2" | ||
with: | ||
name: 'packages' | ||
path: '${{ github.workspace }}/artifacts' | ||
|
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
cd dss_python | ||
|
||
if [ "$RUNNER_OS" = "Windows" ]; then | ||
CONDA=`cygpath "$CONDA"` | ||
export ARTIFACTS_FOLDER=`readlink -f ../artifacts` | ||
fi | ||
|
||
export PATH=$CONDA:$CONDA/bin:$CONDA/scripts:$PATH | ||
export DSS_PYTHON_MANYLINUX=0 | ||
|
||
source $CONDA/etc/profile.d/conda.sh | ||
|
||
# Update the recipe | ||
DSS_PYTHON_PREPARE_BOA=1 python setup.py | ||
|
||
conda config --set always_yes yes --set changeps1 no | ||
conda config --add channels conda-forge | ||
conda create -p ../boa boa anaconda-client | ||
conda activate boa | ||
|
||
PYTHON_VERSIONS="3.6 3.7 3.8 3.9 3.10" | ||
for pyversion in $PYTHON_VERSIONS | ||
do | ||
# Workaround to build when a single version fails | ||
echo "python:" > conda/version.yaml | ||
echo " - $pyversion" >> conda/version.yaml | ||
boa build --no-test conda -m conda/version.yaml | ||
done | ||
|
||
#boa build --no-test conda -m conda/conda_build_config.yaml | ||
|
||
mv $CONDA/conda-bld/*-64 $ARTIFACTS_FOLDER/ |
Oops, something went wrong.