Skip to content

Commit

Permalink
[ci] reorder install, run apt-get first
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Aug 28, 2023
1 parent 055e769 commit 8c125b4
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install -y ghostscript

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
Expand Down Expand Up @@ -63,13 +66,11 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.python-version }}-${{ env.cache-version }}
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.python-version }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install -y ghostscript
- name: Install python dependencies
run: |
conda install -y -c conda-forge mamba
mamba install -y -c https://cxc.cfa.harvard.edu/conda/ciao ciao sherpa ds9 ciao-contrib caldb_main
mamba install -y ultranest coverage coveralls scipy "matplotlib>=3.5" h5py astropy requests cython tqdm coverage toml
mamba install -y -c conda-forge ultranest coverage coveralls scipy "matplotlib>=3.5" h5py astropy requests cython tqdm coverage toml
pip install git+https://github.com/JohannesBuchner/coverage-lcov
sudo sed -i '/PDF/s/none/read|write/' /etc/ImageMagick-6/policy.xml
Expand Down Expand Up @@ -172,13 +173,26 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install -y ghostscript

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true
#mamba-version: "*"


- name: Install mamba
run: conda install -y -c conda-forge mamba

- name: Install python dependencies
run: |
mamba install -y -c conda-forge ultranest coverage coveralls scipy "matplotlib>=3.5" h5py astropy requests cython tqdm coverage toml
pip install git+https://github.com/JohannesBuchner/coverage-lcov
sudo sed -i '/PDF/s/none/read|write/' /etc/ImageMagick-6/policy.xml
- name: Set directory names
run: |
echo "MYCACHE=$HOME/Downloads/xspec" >> $GITHUB_ENV
Expand All @@ -199,16 +213,6 @@ jobs:
wget -q -nc https://zenodo.org/record/1169181/files/uxclumpy-cutoff.fits https://zenodo.org/record/1169181/files/uxclumpy-cutoff-omni.fits;
popd
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install -y ghostscript

- name: Install python dependencies
run: |
conda install -y -c conda-forge mamba
mamba install -c conda-forge -y ultranest coverage coveralls scipy "matplotlib>=3.5" h5py astropy requests cython tqdm coverage toml
pip install git+https://github.com/JohannesBuchner/coverage-lcov
sudo sed -i '/PDF/s/none/read|write/' /etc/ImageMagick-6/policy.xml
- name: Cache xspec install
uses: pat-s/[email protected]
id: cache-xspec
Expand Down Expand Up @@ -252,7 +256,7 @@ jobs:
echo "PATH: $PATH";
python -c 'import xspec' || true;
- name: Test install
- name: Check install
run: |
python -c "import numpy";
python -c "import xspec"
Expand Down

0 comments on commit 8c125b4

Please sign in to comment.