|
| 1 | +name: Build Pull Request |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths-ignore: |
| 6 | + - '.github/**' |
| 7 | + - 'docs/**' |
| 8 | + - '!.github/workflows/**' |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + starenv: [root5] |
| 20 | + compiler: [gcc485] |
| 21 | + env: |
| 22 | + STARENV: ${{ matrix.starenv }}-${{ matrix.compiler }} |
| 23 | + steps: |
| 24 | + - name: Set up Docker Buildx |
| 25 | + uses: docker/setup-buildx-action@v2 |
| 26 | + with: |
| 27 | + driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10000000 |
| 28 | + |
| 29 | + - name: Build with Docker |
| 30 | + uses: docker/build-push-action@v3 |
| 31 | + with: |
| 32 | + build-args: | |
| 33 | + starenv=${{ matrix.starenv }} |
| 34 | + compiler=${{ matrix.compiler }} |
| 35 | + tags: ghcr.io/star-bnl/star-sw-${{ env.STARENV }} |
| 36 | + outputs: type=docker,dest=/tmp/star-sw-${{ env.STARENV }}.tar |
| 37 | + |
| 38 | + - name: Save built image for test jobs |
| 39 | + uses: actions/upload-artifact@v3 |
| 40 | + with: |
| 41 | + name: star-sw-${{ env.STARENV }} |
| 42 | + path: /tmp/star-sw-${{ env.STARENV }}.tar |
| 43 | + |
| 44 | + ROOT5_test: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + needs: build |
| 47 | + strategy: |
| 48 | + fail-fast: false |
| 49 | + matrix: |
| 50 | + test_id: [10, 11, 22, 23, 24, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 76, 77, 78, 90, 91, 92, 102, 103, 119, 120, 121] |
| 51 | + compiler: [gcc485] |
| 52 | + env: |
| 53 | + STARENV: root5-${{ matrix.compiler }} |
| 54 | + steps: |
| 55 | + - name: Download artifact |
| 56 | + uses: actions/download-artifact@v3 |
| 57 | + with: |
| 58 | + name: star-sw-${{ env.STARENV }} |
| 59 | + path: /tmp |
| 60 | + |
| 61 | + - run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar |
| 62 | + - run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v6 |
| 63 | + - run: | |
| 64 | + TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py -c ${{ matrix.test_id }}) |
| 65 | + # Workaround https://sft.its.cern.ch/jira/browse/ROOT-7660 in ROOT 5 by checking the output log |
| 66 | + docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \ |
| 67 | + sh -c "set -e; MALLOC_CHECK_=3 $TEST_CMD 2>&1 | tee log; grep 'Run completed' log" |
| 68 | +
|
| 69 | + ROOT5_test_doEvents: |
| 70 | + runs-on: ubuntu-latest |
| 71 | + needs: build |
| 72 | + strategy: |
| 73 | + fail-fast: false |
| 74 | + matrix: |
| 75 | + test_id: [121, 122] |
| 76 | + compiler: [gcc485] |
| 77 | + env: |
| 78 | + STARENV: root5-${{ matrix.compiler }} |
| 79 | + steps: |
| 80 | + - name: Download artifact |
| 81 | + uses: actions/download-artifact@v3 |
| 82 | + with: |
| 83 | + name: star-sw-${{ env.STARENV }} |
| 84 | + path: /tmp |
| 85 | + |
| 86 | + - run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar |
| 87 | + - run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v6 |
| 88 | + - run: | |
| 89 | + TEST_FILE=$(echo "$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py ${{ matrix.test_id }} -a fullpath)" | sed -E 's/\.(daq|fzd)$/.event.root/') |
| 90 | + TEST_CMD="root4star -b -q -l 'StRoot/macros/analysis/doEvents.C(100, \"$TEST_FILE\")'" |
| 91 | + docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \ |
| 92 | + sh -c "set -e; $TEST_CMD 2>&1 | tee log; grep '<StIOMaker::Finish> IO:' log" |
| 93 | +
|
| 94 | + ROOT5_test_find_vertex: |
| 95 | + runs-on: ubuntu-latest |
| 96 | + needs: build |
| 97 | + strategy: |
| 98 | + fail-fast: false |
| 99 | + matrix: |
| 100 | + test_id: [102, 121, 122] |
| 101 | + compiler: [gcc485] |
| 102 | + env: |
| 103 | + STARENV: root5-${{ matrix.compiler }} |
| 104 | + steps: |
| 105 | + - name: Download artifact |
| 106 | + uses: actions/download-artifact@v3 |
| 107 | + with: |
| 108 | + name: star-sw-${{ env.STARENV }} |
| 109 | + path: /tmp |
| 110 | + |
| 111 | + - run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar |
| 112 | + - run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v6 |
| 113 | + - run: | |
| 114 | + TEST_FILE=$(echo "$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py ${{ matrix.test_id }} -a fullpath)" | sed -E 's/\.(daq|fzd)$/.event.root/') |
| 115 | + TEST_CMD="root4star -b -q -l 'StRoot/macros/analysis/find_vertex.C(\"$TEST_FILE\")'" |
| 116 | + docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \ |
| 117 | + sh -c "set -e; $TEST_CMD 2>&1 | tee log; grep '<StIOMaker::Finish> StIO:' log" |
0 commit comments