-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 2.03 KB
/
publish-rapidgzip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish Rapidgzip to PyPI
on:
push:
tags:
- 'rapidgzip-v*.*.*'
jobs:
Deploy-Conda:
# Not working yet and indexed_bzip2 only has a single download from conda ...
if: false
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
env:
MACOSX_DEPLOYMENT_TARGET: "10.14"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
- name: Fix macOS CommandLineTools Bug
if: matrix.os == 'macos-latest'
shell: bash
run: |
# See test.yml workflow for explanation but in short: conda build only works with the older SDK installed.
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz
tar -xf MacOSX10.9.sdk.tar.xz
cat <<EOF >> conda/conda_build_config.yaml
CONDA_BUILD_SYSROOT:
- $PWD/MacOSX10.9.sdk
EOF
- name: Build Conda Packages
# Windows yields: fatal error C1001: An internal error has occurred in the compiler.
# (compiler file 'msc1.cpp', line 1518)
# This happens on the line: static constexpr FixedHuffmanCoding m_fixedHC = createFixedHC();
# This is understandable because it is the most complex code but the wheels do build just fine though.
if: matrix.os != 'windows-latest'
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitely declared as shell:
# bash -l {0} on steps that need to be properly activated
shell: bash -l {0}
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install conda conda-build anaconda-client conda-verify packaging
conda config --set anaconda_upload yes
cd python/rapidgzip/conda
python3 -m pip install --user build
python3 -m build -o . --sdist ..
mv rapidgzip-*.tar* src.tar
conda build --token "$ANACONDA_TOKEN" .