Skip to content

Commit

Permalink
Skip building docker images when the image is present (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed Jan 25, 2021
1 parent 69f27ac commit f96fb3c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,52 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
jobqueue: ["htcondor", "pbs", "sge", "slurm", "none"]

steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Checkout source
uses: actions/checkout@v2

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: 3.6
environment-file: ci/environment.yml
channels: conda-forge
mamba-version: "*"
activate-environment: dask-jobqueue
auto-activate-base: false

- name: Setup conda environment
run: |
mamba env update -f ci/environment.yml
mamba list
- name: Setup
shell: bash -l {0}
run: |
source ci/${{ matrix.jobqueue }}.sh
jobqueue_before_install
- name: Install
shell: bash -l {0}
run: |
source ci/${{ matrix.jobqueue }}.sh
jobqueue_install
- name: Test
shell: bash -l {0}
run: |
source ci/${{ matrix.jobqueue }}.sh
jobqueue_script
- name: Cleanup
shell: bash -l {0}
run: |
source ci/${{ matrix.jobqueue }}.sh
jobqueue_after_script
2 changes: 1 addition & 1 deletion ci/pbs/start-pbs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

docker-compose up -d
docker-compose up -d --no-build
while [ `docker exec -u pbsuser pbs_master pbsnodes -a | grep "Mom = pbs_slave" | wc -l` -ne 2 ]
do
echo "Waiting for PBS slave nodes to become available";
Expand Down
2 changes: 1 addition & 1 deletion ci/sge/start-sge.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

docker-compose up -d
docker-compose up -d --no-build
while [ `docker exec sge_master qhost | grep lx26-amd64 | wc -l` -ne 2 ]
do
echo "Waiting for SGE slots to become available";
Expand Down
2 changes: 1 addition & 1 deletion ci/slurm/start-slurm.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

docker-compose up -d
docker-compose up -d --no-build

while [ `./register_cluster.sh 2>&1 | grep "sacctmgr: error" | wc -l` -ne 0 ]
do
Expand Down

0 comments on commit f96fb3c

Please sign in to comment.