From 82a600dd17c700b708ed2c45073372296797b194 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Thu, 26 Sep 2024 08:39:26 +0200 Subject: [PATCH 1/5] Try for some output, with a checkout. Daring! --- .github/workflows/waste_time.yaml | 92 ++++++------------------------- 1 file changed, 16 insertions(+), 76 deletions(-) diff --git a/.github/workflows/waste_time.yaml b/.github/workflows/waste_time.yaml index 319ce9d..c3a16cc 100644 --- a/.github/workflows/waste_time.yaml +++ b/.github/workflows/waste_time.yaml @@ -1,82 +1,22 @@ +--- on: pull_request: types: [opened, edited, synchronize, reopened] push: - branches: - - main - - ci/** - - -concurrency: - # Don't cancel on main, creating a PR when a push workflow is already going will cancel the push workflow in favour of the PR workflow - group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.number && github.head_ref || github.ref_name }} - cancel-in-progress: true - - -# For Draft PRs, we only want the herpaderp step 1 -# For Non-Draft PRs, we want all the steps + branches: [main, ci/**] jobs: - show-variables: - runs-on: ubuntu-latest - name: "Show variables" + some-output: + runs-on: + - codebuild-spacktainers-${{ github.run_id }}-${{ github.run_attempt }} + name: Quick test with some output steps: - - name: "The actual showing of variables" - run: | - echo Workflow is .${{ github.workflow }}. - echo Ref is .${{ github.ref }}. - echo Run ID is .${{ github.run_id }}. - echo PR number is .${{ github.event.number }}. - echo Group boils down to ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.number && github.head_ref || github.ref_name }} - mootrix: - runs-on: ${{ matrix.os }} - name: Mootrix ${{ matrix.os }} - ${{ matrix.config.moo }} - strategy: - matrix: - os: [ macOS-11, ubuntu-latest ] - config: - - {"moo": "boo"} - - {"moo": "blergh"} - include: - - os: ubuntu-20.04 - config: - moo: "herpaderp" - - steps: - - name: ${{ matrix.config.moo }} should only run for herpaderp on draft - if: ${{ github.event.pull_request.draft == true && matrix.config.moo == 'herpaderp' }} - run: | - echo "Doing the thing" - sleep 20 - echo "The thing is done" - - name: Always run - run: | - echo "This thing always happens" - sleep 20 - echo "And has now been concluded" - - meowtrix: - runs-on: ${{ matrix.os }} - name: Meowtrix ${{ matrix.os }} - ${{ matrix.config.moo }} - if: '${{ ! github.event.pull_request.draft }}' - strategy: - matrix: - os: [ macOS-11, ubuntu-latest ] - config: - - {"moo": "boo"} - - {"moo": "blergh"} - include: - - os: ubuntu-20.04 - config: - moo: "herpaderp" - - steps: - - name: First step - run: | - echo "Doing the thing" - sleep 20 - echo "The thing is done" - - name: Second step - run: | - echo "Doing the other thing" - sleep 20 - echo "The other thing is also done" + - name: Checkout repo + uses: actions/checkout@v4 + - name: Do something + run: |- + echo "Hello world" + pwd + ls + ls /opt + ls /opt/spack/* + echo "All done" From 6563162f1d3a17d9b6774ba05f0807974947cd02 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Thu, 26 Sep 2024 08:45:30 +0200 Subject: [PATCH 2/5] Some output to a file --- .github/workflows/waste_time.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/waste_time.yaml b/.github/workflows/waste_time.yaml index c3a16cc..597c375 100644 --- a/.github/workflows/waste_time.yaml +++ b/.github/workflows/waste_time.yaml @@ -20,3 +20,16 @@ jobs: ls /opt ls /opt/spack/* echo "All done" + - name: Write to file + run: |- + echo "Hello world" > /tmp/output.log + pwd >> /tmp/output.log + ls >> /tmp/output.log + ls /opt >> /tmp/output.log + ls /opt/spack/* >> /tmp/output.log + echo "All done" >> /tmp/output.log + - name: Archive artifact + uses: actions/upload-artifact@v4 + with: + name: output-log + path: /tmp/output.log From 7a931256a5352c9dec075f5c274987bf5f2f07d9 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Thu, 26 Sep 2024 08:50:54 +0200 Subject: [PATCH 3/5] Another commit --- .github/workflows/waste_time.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/waste_time.yaml b/.github/workflows/waste_time.yaml index 597c375..6eb9961 100644 --- a/.github/workflows/waste_time.yaml +++ b/.github/workflows/waste_time.yaml @@ -19,7 +19,7 @@ jobs: ls ls /opt ls /opt/spack/* - echo "All done" + echo "All done. Really" - name: Write to file run: |- echo "Hello world" > /tmp/output.log From 7cabf12722d84d53752f37d1303b9f29d2cebe03 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Thu, 26 Sep 2024 08:57:42 +0200 Subject: [PATCH 4/5] Correct project name --- .github/workflows/waste_time.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/waste_time.yaml b/.github/workflows/waste_time.yaml index 6eb9961..e318d46 100644 --- a/.github/workflows/waste_time.yaml +++ b/.github/workflows/waste_time.yaml @@ -7,7 +7,7 @@ on: jobs: some-output: runs-on: - - codebuild-spacktainers-${{ github.run_id }}-${{ github.run_attempt }} + - codebuild-personal-repo-test-${{ github.run_id }}-${{ github.run_attempt }} name: Quick test with some output steps: - name: Checkout repo From 3384214ff08e33f632181e106342ac4277a1f7a2 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Thu, 26 Sep 2024 10:10:39 +0200 Subject: [PATCH 5/5] Not on pull requests --- .github/workflows/waste_time.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/waste_time.yaml b/.github/workflows/waste_time.yaml index e318d46..2cba987 100644 --- a/.github/workflows/waste_time.yaml +++ b/.github/workflows/waste_time.yaml @@ -1,7 +1,5 @@ --- on: - pull_request: - types: [opened, edited, synchronize, reopened] push: branches: [main, ci/**] jobs: