Skip to content

Commit

Permalink
Update deprecated syntax in CI.yml (#1160)
Browse files Browse the repository at this point in the history
* udpate ci.yml to use latest docker actions

* update dockerfile

* add back excludes for lower windows build

* rewrite exclude

* fix typo

* try include instead of exclude

* remove windows-latest from matrix
  • Loading branch information
daico007 authored Dec 12, 2023
1 parent c684f92 commit 35426aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
os: [macOS-latest, ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
exclude:
include:
- os: windows-latest
python-version: 3.8
python-version: "3.11"

defaults:
run:
Expand All @@ -36,14 +36,16 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
python-version: ${{ matrix.python-version }}
create-args: >-
python=${{ matrix.python-version }}
if: runner.os != 'Windows'

- name: Install Mamba (Windows)
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev-win.yml
python-version: ${{ matrix.python-version }}
create-args: >-
python=${{ matrix.python-version }}
if: runner.os == 'Windows'

- name: Install Package
Expand Down Expand Up @@ -81,7 +83,7 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
python-version: "3.10"
create-args: python=3.11

- name: Clone Foyer and GMSO
run: |
Expand Down Expand Up @@ -111,10 +113,10 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
Expand All @@ -134,7 +136,7 @@ jobs:
echo Docker Image tags: ${DOCKER_TAGS}
- name: Build and Push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.DOCKER_TAGS }}
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ WORKDIR /mbuild
# Create a group and user
RUN addgroup -S anaconda && adduser -S anaconda -G anaconda

# install the libarchive package needed by mamba
RUN apk update && apk add libarchive

RUN conda update conda -yq && \
RUN apk update && apk add libarchive &&\
conda update conda -yq && \
conda config --set always_yes yes --set changeps1 no && \
. /opt/conda/etc/profile.d/conda.sh && \
sed -i -E "s/python.*$/python="$(PY_VERSION)"/" environment-dev.yml && \
conda install -c conda-forge mamba && \
mamba env create nomkl --file environment-dev.yml && \
mamba env create --file environment-dev.yml && \
conda activate mbuild-dev && \
mamba install -c conda-forge nomkl jupyter python="$PY_VERSION" && \
mamba install -c conda-forge jupyter python="$PY_VERSION" && \
python setup.py install && \
echo "source activate mbuild-dev" >> \
/home/anaconda/.profile && \
Expand All @@ -37,7 +35,6 @@ RUN conda update conda -yq && \
chown -R anaconda:anaconda /opt && \
chown -R anaconda:anaconda /home/anaconda


WORKDIR /home/anaconda

COPY devtools/docker-entrypoint.sh /entrypoint.sh
Expand Down

0 comments on commit 35426aa

Please sign in to comment.