Skip to content

Commit 70d0e46

Browse files
Use ubunut 20.04, use main instead of defaults
Get packages from intel channel only Use conda create instead of conda install Remember to source conda
1 parent 727a6fd commit 70d0e46

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.github/workflows/conda-package.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ env:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
strategy:
1313
matrix:
1414
python: [3.9]
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
with:
1818
fetch-depth: 0
1919

2020
- name: Set pkgs_dirs
2121
run: |
2222
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
2323
- name: Cache conda packages
24-
uses: actions/cache@v2
24+
uses: actions/cache@v3
2525
env:
2626
CACHE_NUMBER: 0 # Increase to reset cache
2727
with:
@@ -38,7 +38,7 @@ jobs:
3838
run: conda install conda-build
3939
- name: Build conda package
4040
run: |
41-
CHANNELS="-c intel -c defaults --override-channels"
41+
CHANNELS="-c intel -c main --override-channels"
4242
VERSIONS="--python ${{ matrix.python }}"
4343
TEST="--no-test"
4444
@@ -48,7 +48,7 @@ jobs:
4848
$CHANNELS \
4949
conda-recipe
5050
- name: Upload artifact
51-
uses: actions/upload-artifact@v2
51+
uses: actions/upload-artifact@v3
5252
with:
5353
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
5454
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
@@ -61,14 +61,14 @@ jobs:
6161
matrix:
6262
python: [3.9]
6363
experimental: [false]
64-
runner: [ubuntu-latest]
64+
runner: [ubuntu-20.04]
6565
continue-on-error: ${{ matrix.experimental }}
6666
env:
67-
CHANNELS: -c intel -c defaults --override-channels
67+
CHANNELS: -c intel -c main --override-channels
6868

6969
steps:
7070
- name: Download artifact
71-
uses: actions/download-artifact@v2
71+
uses: actions/download-artifact@v3
7272
with:
7373
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
7474
- name: Add conda to system path
@@ -86,12 +86,14 @@ jobs:
8686
- name: Collect dependencies
8787
run: |
8888
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
89-
conda install $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
89+
conda create -n test_mkl_fft $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
90+
- name: Display lockfile
91+
run: cat lockfile
9092
- name: Set pkgs_dirs
9193
run: |
9294
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
9395
- name: Cache conda packages
94-
uses: actions/cache@v2
96+
uses: actions/cache@v3
9597
env:
9698
CACHE_NUMBER: 0 # Increase to reset cache
9799
with:
@@ -105,9 +107,11 @@ jobs:
105107
- name: Install mkl_fft
106108
run: |
107109
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
108-
conda install $PACKAGE_NAME pytest python=${{ matrix.python }} $CHANNELS
110+
conda create -n test_mkl_fft python=${{ matrix.python }} "libffi>=3.4" $PACKAGE_NAME pytest $CHANNELS
109111
# Test installed packages
110-
conda list
112+
conda list -n test_mkl_fft
111113
- name: Run tests
112114
run: |
115+
source $CONDA/etc/profile.d/conda.sh
116+
conda activate test_mkl_fft
113117
python -m pytest --pyargs $MODULE_NAME

0 commit comments

Comments
 (0)