diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml index 66ef867eed8..7bbaf970f18 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda.yml @@ -17,6 +17,9 @@ on: jobs: conda-win: runs-on: windows-2019 + defaults: + run: + shell: powershell steps: - uses: actions/checkout@v3 with: @@ -28,30 +31,31 @@ jobs: - name: vcs import run: > vcs import --input "${{ github.workspace }}/workspace/src/tesseract/.github/workflows/windows_dependencies.repos" workspace/src/ - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: - miniforge-variant: Mambaforge - channel-priority: true - channels: conda-forge + channel-priority: strict + environment-file: workspace/src/tesseract/.github/workflows/conda/environment.yml use-mamba: true - - name: conda install - run: | - mamba activate test - mamba update --all -y - mamba install boa conda-smithy -y + auto-update-conda: true + activate-environment: tesseract-build - name: build and test run: | - mamba activate test + conda info + conda list + mkdir conda xcopy /E workspace\src\tesseract\.github\workflows\conda conda cd conda New-Item -Name conda-forge.yml -ItemType File conda smithy regenerate - mamba mambabuild -m .ci_support/win_64_.yaml . + conda mambabuild -m .ci_support/win_64_.yaml . conda-linux: runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} steps: - uses: actions/checkout@v3 with: @@ -62,22 +66,21 @@ jobs: - name: vcs import run: > vcs import --input "${{ github.workspace }}/workspace/src/tesseract/.github/workflows/windows_dependencies.repos" workspace/src/ - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: - miniforge-variant: Mambaforge - channel-priority: true - channels: conda-forge - python-version: "3.10" + channel-priority: strict + environment-file: workspace/src/tesseract/.github/workflows/conda/environment.yml use-mamba: true - - name: conda install - run: | - mamba update --all -y - mamba install boa conda-smithy -y + auto-update-conda: true + activate-environment: tesseract-build - name: build and test run: | + conda info + conda list + cp -r workspace/src/tesseract/.github/workflows/conda ./conda cd conda touch conda-forge.yml conda smithy regenerate - mamba mambabuild -m .ci_support/linux_64_.yaml . + conda mambabuild -m .ci_support/linux_64_.yaml . diff --git a/.github/workflows/conda/environment.yml b/.github/workflows/conda/environment.yml new file mode 100644 index 00000000000..909dc29d5e7 --- /dev/null +++ b/.github/workflows/conda/environment.yml @@ -0,0 +1,6 @@ +name: tesseract-build +channels: + - conda-forge +dependencies: + - boa + - conda-smithy \ No newline at end of file