From 68a0e01b2c797ca38852b2fb6facb1ef15e6ed3e Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Tue, 5 Dec 2023 09:29:17 -0800 Subject: [PATCH] original ci workflow. --- .github/workflows/ci.yml | 116 ++++++++++----------- docker.yml => .github/workflows/docker.yml | 0 2 files changed, 57 insertions(+), 59 deletions(-) rename docker.yml => .github/workflows/docker.yml (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4ad8d01..81f4377f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,67 +3,65 @@ on: push: branches: - main + workflow_dispatch: {} + pull_request: + types: [opened, labeled, synchronize] + branches: + - main jobs: - test: + docker-image: + uses: ./.github/workflows/docker.yml + linux-build: runs-on: ubuntu-latest + needs: [docker-image] + container: + image: ghcr.io/llnl/scaleuprom/scaleuprom_env:latest + options: --user 1001 --privileged + volumes: + - /mnt:/mnt steps: - - name: test ci + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 + - name: Check out scaleupROM + uses: actions/checkout@v3 + - name: Build scaleupROM run: | - echo "test run" - - # docker-image: - # uses: ./.github/workflows/docker.yml - # linux-build: - # runs-on: ubuntu-latest - # needs: [docker-image] - # container: - # image: ghcr.io/llnl/scaleuprom/scaleuprom_env:latest - # options: --user 1001 --privileged - # volumes: - # - /mnt:/mnt - # steps: - # - name: Cancel previous runs - # uses: styfle/cancel-workflow-action@0.11.0 - # with: - # access_token: ${{ github.token }} - # - name: Set Swap Space - # uses: pierotofy/set-swap-space@master - # with: - # swap-size-gb: 10 - # - name: Check out scaleupROM - # uses: actions/checkout@v3 - # - name: Build scaleupROM - # run: | - # mkdir ${GITHUB_WORKSPACE}/build - # cd ${GITHUB_WORKSPACE}/build - # cmake .. -DBUILD_SKETCHES=On - # make -j 4 - # - name: Upload the compiled artifacts - # uses: actions/upload-artifact@master - # with: - # name: build-dir - # path: ${GITHUB_WORKSPACE}/build - # linux-test: - # runs-on: ubuntu-latest - # needs: [docker-image, linux-build] - # container: - # image: ghcr.io/llnl/scaleuprom/scaleuprom_env:latest - # options: --user 1001 --privileged - # volumes: - # - /mnt:/mnt - # steps: - # - name: Cancel previous runs - # uses: styfle/cancel-workflow-action@0.11.0 - # with: - # access_token: ${{ github.token }} - # - name: Set Swap Space - # uses: pierotofy/set-swap-space@master - # with: - # swap-size-gb: 10 - # - name: Check out scaleupROM - # uses: actions/checkout@v3 - # - name: Download the compiled artifacts - # uses: actions/download-artifact@master - # with: - # name: build-dir \ No newline at end of file + mkdir ${GITHUB_WORKSPACE}/build + cd ${GITHUB_WORKSPACE}/build + cmake .. -DBUILD_SKETCHES=On + make -j 4 + - name: Upload the compiled artifacts + uses: actions/upload-artifact@master + with: + name: build-dir + path: ${GITHUB_WORKSPACE}/build + linux-test: + runs-on: ubuntu-latest + needs: [docker-image, linux-build] + container: + image: ghcr.io/llnl/scaleuprom/scaleuprom_env:latest + options: --user 1001 --privileged + volumes: + - /mnt:/mnt + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 + - name: Check out scaleupROM + uses: actions/checkout@v3 + - name: Download the compiled artifacts + uses: actions/download-artifact@master + with: + name: build-dir \ No newline at end of file diff --git a/docker.yml b/.github/workflows/docker.yml similarity index 100% rename from docker.yml rename to .github/workflows/docker.yml