11name : Build conda nightly
2- on : [push, pull_request]
2+ on :
3+ push :
4+ branches :
5+ - main
6+ pull_request :
7+ paths :
8+ - Cargo.toml
9+ - Cargo.lock
10+ - pyproject.toml
11+ - conda/recipes/**
12+ - .github/workflows/conda.yml
13+ schedule :
14+ - cron : ' 0 0 * * 0'
315
4- # Cancel any already running instances of this build
16+ # When this workflow is queued, automatically cancel any previous running
17+ # or pending jobs from the same branch
518concurrency :
619 group : conda-${{ github.head_ref }}
720 cancel-in-progress : true
@@ -13,9 +26,44 @@ defaults:
1326
1427jobs :
1528 conda :
16- name : Build (and optionally upload) the conda nightly
29+ name : " Build conda nightlies (python: ${{ matrix.python }}, arch: ${{ matrix.arch }}) "
1730 runs-on : ubuntu-latest
31+ strategy :
32+ fail-fast : false
33+ matrix :
34+ python : ["3.8", "3.9", "3.10"]
35+ arch : ["linux-64", "linux-aarch64"]
1836 steps :
37+ - name : Manage disk space
38+ if : matrix.arch == 'linux-aarch64'
39+ run : |
40+ sudo mkdir -p /opt/empty_dir || true
41+ for d in \
42+ /opt/ghc \
43+ /opt/hostedtoolcache \
44+ /usr/lib/jvm \
45+ /usr/local/.ghcup \
46+ /usr/local/lib/android \
47+ /usr/local/share/powershell \
48+ /usr/share/dotnet \
49+ /usr/share/swift \
50+ ; do
51+ sudo rsync --stats -a --delete /opt/empty_dir/ $d || true
52+ done
53+ sudo apt-get purge -y -f firefox \
54+ google-chrome-stable \
55+ microsoft-edge-stable
56+ sudo apt-get autoremove -y >& /dev/null
57+ sudo apt-get autoclean -y >& /dev/null
58+ sudo docker image prune --all --force
59+ df -h
60+ - name : Create swapfile
61+ if : matrix.arch == 'linux-aarch64'
62+ run : |
63+ sudo fallocate -l 10GiB /swapfile || true
64+ sudo chmod 600 /swapfile || true
65+ sudo mkswap /swapfile || true
66+ sudo swapon /swapfile || true
1967 - uses : actions/checkout@v3
2068 with :
2169 fetch-depth : 0
@@ -24,38 +72,34 @@ jobs:
2472 with :
2573 miniforge-variant : Mambaforge
2674 use-mamba : true
27- python-version : " 3.10 "
75+ python-version : " 3.8 "
2876 channel-priority : strict
2977 - name : Install dependencies
3078 run : |
31- mamba install boa conda-verify
79+ mamba install -c conda-forge boa conda-verify
3280
3381 which python
3482 pip list
3583 mamba list
36- - uses : actions-rs/toolchain@v1
37- with :
38- profile : minimal
39- toolchain : stable
40- override : true
41- components : clippy, rustfmt
42- - name : Build conda package
84+ - name : Build conda packages
4385 run : |
4486 # suffix for nightly package versions
4587 export VERSION_SUFFIX=a`date +%y%m%d`
4688
4789 conda mambabuild conda/recipes \
90+ --python ${{ matrix.python }} \
91+ --variants "{target_platform: [${{ matrix.arch }}]}" \
92+ --error-overlinking \
93+ --no-test \
4894 --no-anaconda-upload \
49- --output-folder .
50- # - name: Upload conda package
51- # if: |
52- # github.event_name == 'push'
53- # && github.repository == 'apache/arrow-datafusion-python'
54- # env:
55- # ANACONDA_API_TOKEN: ${{ secrets.DASK_CONDA_TOKEN }}
56- # LABEL: ${{ github.ref == 'refs/heads/datafusion-sql-planner' && 'dev_datafusion' || 'dev' }}
57- # run: |
58- # # install anaconda for upload
59- # mamba install anaconda-client
60-
61- # anaconda upload --label $LABEL linux-64/*.tar.bz2
95+ --output-folder packages
96+ - name : Test conda packages
97+ if : matrix.arch == 'linux-64' # can only test native platform packages
98+ run : |
99+ conda mambabuild --test packages/${{ matrix.arch }}/*.tar.bz2
100+ - name : Upload conda packages as artifacts
101+ uses : actions/upload-artifact@v3
102+ with :
103+ name : " conda nightlies (python - ${{ matrix.python }}, arch - ${{ matrix.arch }})"
104+ # need to install all conda channel metadata to properly install locally
105+ path : packages/
0 commit comments