Update readme #4
Workflow file for this run
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
name: Conda package | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
PACKAGE_NAME: itt-python | |
jobs: | |
build_and_test_linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set pkgs_dirs | |
run: | | |
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | |
- name: Add conda to system path | |
run: echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install conda-build | |
run: conda install conda-build | |
- name: Build conda package | |
run: | | |
CHANNELS="-c conda-forge --override-channels" | |
VERSIONS="--python ${{ matrix.python }}" | |
conda build \ | |
$VERSIONS \ | |
$CHANNELS \ | |
conda-recipe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2 | |
build_and_test_windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python: ['3.9', '3.10', '3.11', '3.12'] | |
env: | |
conda-bld: C:\Miniconda\conda-bld\win-64\ | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Miniforge3 | |
miniforge-version: latest | |
activate-environment: build | |
channels: conda-forge | |
python-version: ${{ matrix.python }} | |
- name: Install conda build | |
run: | | |
conda activate | |
conda install -y conda-build | |
conda list -n base | |
- name: Build conda package | |
run: | | |
conda activate | |
conda build --python ${{ matrix.python }} -c conda-forge --override-channels conda-recipe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2 | |