|
1 | | -name: Python Package using Conda |
| 1 | +name: Python Package using Conda (Miniforge + Rocky Linux) |
2 | 2 |
|
3 | 3 | on: [push] |
4 | 4 |
|
5 | 5 | jobs: |
6 | | - build: |
7 | | - runs-on: ${{ matrix.os }} |
8 | | - timeout-minutes: 30 # Increased timeout limit |
9 | | - strategy: |
10 | | - matrix: |
11 | | - os: [ubuntu-latest, macos-latest] |
| 6 | + build-linux-oldglibc: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + timeout-minutes: 30 |
12 | 9 |
|
13 | 10 | steps: |
14 | | - - uses: actions/checkout@v3 |
15 | | - with: |
16 | | - fetch-depth: 0 |
17 | | - - uses: conda-incubator/setup-miniconda@v2 |
18 | | - with: |
19 | | - miniforge-version: latest |
20 | | - - name: Install conda-build |
21 | | - shell: bash -l {0} |
22 | | - run: conda install conda-build setuptools_scm boa git |
23 | | - - name: build package |
24 | | - shell: bash -l {0} |
25 | | - run: | |
26 | | - export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm) |
27 | | - echo "Version: " |
28 | | - echo $SETUPTOOLS_SCM_PRETEND_VERSION |
29 | | - conda mambabuild $GITHUB_WORKSPACE/conda-recipe --output-folder=$GITHUB_WORKSPACE |
30 | | - - uses: actions/upload-artifact@v4 |
31 | | - with: |
32 | | - name: package-${{ github.job }}-${{ matrix.os }} |
33 | | - path: ${{ github.workspace }}/**/azint*.bz2 |
| 11 | + - uses: actions/checkout@v3 |
| 12 | + with: |
| 13 | + fetch-depth: 0 |
| 14 | + |
| 15 | + - name: Prepare output folder |
| 16 | + run: mkdir -p ${{ github.workspace }}/conda-bld |
| 17 | + |
| 18 | + - name: Build conda package inside Rocky Linux 8 container |
| 19 | + run: | |
| 20 | + docker run --rm \ |
| 21 | + -v ${{ github.workspace }}:/workdir \ |
| 22 | + -w /workdir \ |
| 23 | + rockylinux:8 /bin/bash -c " |
| 24 | + dnf install -y epel-release && \ |
| 25 | + dnf install -y git wget bzip2 make gcc gcc-c++ python3 python3-pip && \ |
| 26 | + wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniconda.sh && \ |
| 27 | + bash miniconda.sh -b -p /opt/conda && \ |
| 28 | + rm miniconda.sh && \ |
| 29 | + export PATH=/opt/conda/bin:\$PATH && \ |
| 30 | + conda config --remove channels defaults || true && \ |
| 31 | + conda config --add channels conda-forge && \ |
| 32 | + conda config --set channel_priority strict && \ |
| 33 | + conda install -y mamba conda-build boa setuptools_scm git && \ |
| 34 | + export SETUPTOOLS_SCM_PRETEND_VERSION=\$(python -m setuptools_scm) && \ |
| 35 | + echo \"Version: \$SETUPTOOLS_SCM_PRETEND_VERSION\" && \ |
| 36 | + conda mambabuild conda-recipe --output-folder=/workdir/conda-bld |
| 37 | + " |
| 38 | +
|
| 39 | + - name: Upload built Linux packages |
| 40 | + uses: actions/upload-artifact@v4 |
| 41 | + with: |
| 42 | + name: package-linux-oldglibc |
| 43 | + path: | |
| 44 | + ${{ github.workspace }}/conda-bld/**/azint*.bz2 |
| 45 | + ${{ github.workspace }}/conda-bld/**/azint*.conda |
34 | 46 |
|
35 | 47 | build-win: |
36 | | - runs-on: windows-latest |
37 | | - timeout-minutes: 30 # Increased timeout limit |
| 48 | + runs-on: windows-2022 |
| 49 | + timeout-minutes: 30 |
38 | 50 |
|
39 | 51 | steps: |
40 | | - - uses: actions/checkout@v3 |
41 | | - with: |
42 | | - fetch-depth: 0 |
43 | | - - uses: ilammy/msvc-dev-cmd@v1 |
44 | | - - uses: conda-incubator/setup-miniconda@v2 |
45 | | - with: |
46 | | - miniforge-version: latest |
47 | | - - name: Install conda-build |
48 | | - shell: pwsh # Use PowerShell shell |
49 | | - run: conda install conda-build setuptools_scm boa git |
50 | | - - name: build package |
51 | | - shell: pwsh |
52 | | - run: | |
53 | | - $env:SETUPTOOLS_SCM_PRETEND_VERSION = $(python -m setuptools_scm) |
54 | | - Write-Host "Version: $env:SETUPTOOLS_SCM_PRETEND_VERSION" |
55 | | - conda mambabuild "$env:GITHUB_WORKSPACE/conda-recipe" --output-folder="$env:GITHUB_WORKSPACE" |
56 | | - - uses: actions/upload-artifact@v4 |
57 | | - with: |
58 | | - name: package-${{ github.job }} |
59 | | - path: ${{ github.workspace }}/**/azint*.bz2 |
| 52 | + - uses: actions/checkout@v3 |
| 53 | + with: |
| 54 | + fetch-depth: 0 |
| 55 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 56 | + - uses: conda-incubator/setup-miniconda@v3 |
| 57 | + with: |
| 58 | + miniforge-version: latest |
| 59 | + channels: conda-forge |
| 60 | + channel-priority: strict |
| 61 | + conda-remove-defaults: true |
| 62 | + - name: Configure conda channels |
| 63 | + shell: pwsh |
| 64 | + run: | |
| 65 | + conda config --remove channels defaults || echo "No defaults channel found" |
| 66 | + conda config --add channels defaults |
| 67 | + conda config --add channels conda-forge |
| 68 | + conda config --set channel_priority strict |
| 69 | + - name: Install conda-build and dependencies |
| 70 | + shell: pwsh |
| 71 | + run: conda install -y mamba conda-build setuptools_scm boa git |
| 72 | + - name: Build package |
| 73 | + shell: pwsh |
| 74 | + run: | |
| 75 | + $env:SETUPTOOLS_SCM_PRETEND_VERSION = $(python -m setuptools_scm) |
| 76 | + Write-Host "Version: $env:SETUPTOOLS_SCM_PRETEND_VERSION" |
| 77 | + conda mambabuild "$env:GITHUB_WORKSPACE/conda-recipe" --output-folder="$env:GITHUB_WORKSPACE" |
| 78 | + - uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: package-win |
| 81 | + path: | |
| 82 | + ${{ github.workspace }}/**/*.bz2 |
| 83 | + ${{ github.workspace }}/**/*.conda |
60 | 84 |
|
61 | | - build-mac-arm: |
| 85 | + build-macos: |
62 | 86 | runs-on: macos-14 |
63 | | - timeout-minutes: 30 # Increased timeout limit |
64 | | - |
| 87 | + timeout-minutes: 30 |
| 88 | + strategy: |
| 89 | + matrix: |
| 90 | + arch: [x86_64, arm64] |
65 | 91 | steps: |
66 | | - - uses: actions/checkout@v3 |
67 | | - with: |
68 | | - fetch-depth: 0 |
69 | | - - uses: conda-incubator/setup-miniconda@v3 |
70 | | - with: |
71 | | - miniforge-version: latest |
72 | | - - name: Install conda-build |
73 | | - shell: bash -l {0} |
74 | | - run: conda install conda-build setuptools_scm boa git |
75 | | - - name: build package |
76 | | - shell: bash -l {0} |
77 | | - run: | |
78 | | - export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm) |
79 | | - echo "Version: " |
80 | | - echo $SETUPTOOLS_SCM_PRETEND_VERSION |
81 | | - conda mambabuild $GITHUB_WORKSPACE/conda-recipe --output-folder=$GITHUB_WORKSPACE |
82 | | - - uses: actions/upload-artifact@v4 |
83 | | - with: |
84 | | - name: package-${{ github.job }} |
85 | | - path: ${{ github.workspace }}/**/azint*.bz2 |
| 92 | + - uses: actions/checkout@v3 |
| 93 | + with: |
| 94 | + fetch-depth: 0 |
| 95 | + - uses: conda-incubator/setup-miniconda@v3 |
| 96 | + with: |
| 97 | + miniforge-version: latest |
| 98 | + architecture: ${{ matrix.arch }} |
| 99 | + channels: conda-forge |
| 100 | + channel-priority: strict |
| 101 | + conda-remove-defaults: true |
| 102 | + - name: Configure conda channels |
| 103 | + shell: bash -l {0} |
| 104 | + run: | |
| 105 | + conda config --remove channels defaults || true |
| 106 | + conda config --add channels defaults |
| 107 | + conda config --add channels conda-forge |
| 108 | + conda config --set channel_priority strict |
| 109 | + - name: Install conda-build |
| 110 | + shell: bash -l {0} |
| 111 | + run: conda install -y mamba conda-build setuptools_scm boa git |
| 112 | + - name: Build package |
| 113 | + shell: bash -l {0} |
| 114 | + run: | |
| 115 | + export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm) |
| 116 | + echo "Version: $SETUPTOOLS_SCM_PRETEND_VERSION" |
| 117 | + conda mambabuild $GITHUB_WORKSPACE/conda-recipe --output-folder=$GITHUB_WORKSPACE |
| 118 | + - uses: actions/upload-artifact@v4 |
| 119 | + with: |
| 120 | + name: package-macos-${{ matrix.arch }} |
| 121 | + path: | |
| 122 | + ${{ github.workspace }}/**/*.bz2 |
| 123 | + ${{ github.workspace }}/**/*.conda |
0 commit comments