From 4c47e9b7681d914d3482d8fb359df13b85c552d8 Mon Sep 17 00:00:00 2001 From: jharenza Date: Fri, 29 Jul 2022 20:56:27 -0400 Subject: [PATCH 1/3] test splitting jobs --- .github/workflows/run-analysis.yml | 80 ++++++++++++++++++++++++------ scripts/run-analysis.sh | 4 +- 2 files changed, 67 insertions(+), 17 deletions(-) diff --git a/.github/workflows/run-analysis.yml b/.github/workflows/run-analysis.yml index 8a0fd1f4c5..eb4769c921 100644 --- a/.github/workflows/run-analysis.yml +++ b/.github/workflows/run-analysis.yml @@ -6,26 +6,76 @@ on: pull_request: jobs: - build_and_run: + build: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v3 - name: Checkout repo + - name: Checkout + uses: actions/checkout@v2 - - name: Build container and download data - uses: ./ - id: download-data + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push + uses: docker/build-push-action@v2 with: - args: OPENPBTA_URL=https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/data OPENPBTA_RELEASE=testing bash download-data.sh + context: . + file: ./Dockerfile + tags: myimage:latest + outputs: type=docker,dest=/tmp/myimage.tar - - name: Run 01-create-interaction-plots in container - uses: ./ - id: create-interaction-plots + - name: Upload artifact + uses: actions/upload-artifact@v2 with: - args: OPENPBTA_ALL=0 bash analyses/interaction-plots/01-create-interaction-plots.sh + name: myimage + path: /tmp/myimage.tar + + download_data: + runs-on: ubuntu-18.04 + needs: build + steps: + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - - name: Run RUN-telomerase-activity-prediction in container - uses: ./ - id: RUN-telomerase-activity-prediction + - name: Download artifact + uses: actions/download-artifact@v2 with: - args: bash analyses/telomerase-activity-prediction/RUN-telomerase-activity-prediction.sh + name: myimage + path: /tmp + + - name: Load Docker image + run: | + docker load --input /tmp/myimage.tar + docker image ls -a + OPENPEDCAN_URL=https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/open-targets OPENPEDCAN_RELEASE=testing bash download-data.sh + + run_analysis: + runs-on: ubuntu-18.04 + needs: | + build + download_data + steps: + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: myimage + path: /tmp + + - name: Load Docker image + run: | + docker load --input /tmp/myimage.tar + docker image ls -a + + - name: Load Docker image + run: | + docker load --input /tmp/myimage.tar + docker image ls -a + + - name: Run Molecular Subtyping - MB + id: RUN-molecular-subtyping-MB + run: | + OPENPBTA_SUBSET=0 bash analyses/molecular-subtyping-MB/run-molecular-subtyping-mb.sh diff --git a/scripts/run-analysis.sh b/scripts/run-analysis.sh index 86aaedb42f..bc1406fa3c 100755 --- a/scripts/run-analysis.sh +++ b/scripts/run-analysis.sh @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash -sh -c "$*" +bash -c "$*" From 23dae6b29db07c4c2f46fb78a901e76b4af27d1c Mon Sep 17 00:00:00 2001 From: jharenza Date: Fri, 29 Jul 2022 21:17:57 -0400 Subject: [PATCH 2/3] try an alternate --- .github/workflows/build-docker.yml | 14 +++++-- .github/workflows/run-analysis.yml | 64 +++++++----------------------- 2 files changed, 25 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 7771fa28c4..dffa394314 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,6 +1,6 @@ name: Build Docker -# Controls when the action will run. +# Controls when the action will run. # Triggers the workflow for a pull request for # dev when the Dockerfile file changes. on: @@ -17,7 +17,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v1 with: registry: pgc-images.sbgenomics.com username: ${{ secrets.DOCKER_HUB_USERNAME }} @@ -26,6 +26,14 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - push: false + context: . + file: ./Dockerfile + tags: myimage:latest + outputs: type=docker,dest=/tmp/myimage.tar - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: myimage + path: /tmp/myimage.tar diff --git a/.github/workflows/run-analysis.yml b/.github/workflows/run-analysis.yml index eb4769c921..b3a23ce36c 100644 --- a/.github/workflows/run-analysis.yml +++ b/.github/workflows/run-analysis.yml @@ -4,34 +4,25 @@ name: Run Analysis on: workflow_dispatch: pull_request: + branches: [ dev ] jobs: - build: + build_and_download_data: runs-on: ubuntu-18.04 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + name: Checkout repo - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Build and push - uses: docker/build-push-action@v2 +# Build docker container and download testing data + - name: Build container and download data + uses: ./ + id: download-data with: - context: . - file: ./Dockerfile - tags: myimage:latest - outputs: type=docker,dest=/tmp/myimage.tar - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: myimage - path: /tmp/myimage.tar + args: OPENPEDCAN_URL=https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/open-targets OPENPEDCAN_RELEASE=testing bash download-data.sh - download_data: + run_analysis: runs-on: ubuntu-18.04 - needs: build + needs: build_and_download_data steps: - name: Set up Docker Buildx @@ -47,35 +38,8 @@ jobs: run: | docker load --input /tmp/myimage.tar docker image ls -a - OPENPEDCAN_URL=https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/open-targets OPENPEDCAN_RELEASE=testing bash download-data.sh - run_analysis: - runs-on: ubuntu-18.04 - needs: | - build - download_data - steps: - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Download artifact - uses: actions/download-artifact@v2 - with: - name: myimage - path: /tmp - - - name: Load Docker image - run: | - docker load --input /tmp/myimage.tar - docker image ls -a - - - name: Load Docker image - run: | - docker load --input /tmp/myimage.tar - docker image ls -a - - - name: Run Molecular Subtyping - MB - id: RUN-molecular-subtyping-MB - run: | + - name: Run Molecular Subtyping - MB + id: RUN-molecular-subtyping-MB + run: | OPENPBTA_SUBSET=0 bash analyses/molecular-subtyping-MB/run-molecular-subtyping-mb.sh From ff0da266f7ca1a387ae6a429edd24d8dfb478768 Mon Sep 17 00:00:00 2001 From: jharenza Date: Fri, 29 Jul 2022 21:33:01 -0400 Subject: [PATCH 3/3] put back false push --- .github/workflows/build-docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index dffa394314..ed6593e290 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -26,6 +26,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: + push: false context: . file: ./Dockerfile tags: myimage:latest