From 627c0fd5ef76f414ae95107ad7217d9fe7d9919e Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:06:27 -0800 Subject: [PATCH 01/15] Alt attempt at running examples --- .github/workflows/examples.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/examples.yaml diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml new file mode 100644 index 00000000..bb242041 --- /dev/null +++ b/.github/workflows/examples.yaml @@ -0,0 +1,28 @@ +name: Run examples + +on: + push: + branches: main + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + + run_examples: + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] + steps: + run: cargo run --example ${{ matrix.example }} + + \ No newline at end of file From 34283d3a9c298fc6af26ceba4dc8012b479e459e Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:08:30 -0800 Subject: [PATCH 02/15] whitespace --- .github/workflows/examples.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index bb242041..5c66f1fa 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -24,5 +24,3 @@ jobs: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] steps: run: cargo run --example ${{ matrix.example }} - - \ No newline at end of file From 1208990bf91651e0c65fa4f5f5647af92343bf23 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:09:19 -0800 Subject: [PATCH 03/15] fix yaml --- .github/workflows/examples.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 5c66f1fa..4822efef 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -23,4 +23,5 @@ jobs: matrix: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] steps: + - name: Run the example run: cargo run --example ${{ matrix.example }} From 3d1f4b18b6757d07ac23fce26dea09304164366b Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:21:20 -0800 Subject: [PATCH 04/15] Artifacts --- .github/workflows/examples.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 4822efef..4febc917 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -15,7 +15,13 @@ jobs: - uses: actions/checkout@v4 - name: Build run: cargo build --verbose - + uses: actions/cache@v4 + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: ixa-12345 + path: . + run_examples: needs: build runs-on: ubuntu-latest @@ -23,5 +29,8 @@ jobs: matrix: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] steps: + - Download the atifact + uses: actions/upload-artifact@v3 + name: ixa-12345 - name: Run the example run: cargo run --example ${{ matrix.example }} From 2fcf21698a02522daa1aec5602b86f5a63fdbf51 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:22:13 -0800 Subject: [PATCH 05/15] Fix example --- .github/workflows/examples.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 4febc917..031deeb8 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -29,7 +29,7 @@ jobs: matrix: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] steps: - - Download the atifact + - name: Download the artifact uses: actions/upload-artifact@v3 name: ixa-12345 - name: Run the example From e08d89709af39fbe22b639bd59bbe92695896823 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:22:46 -0800 Subject: [PATCH 06/15] Fix yaml --- .github/workflows/examples.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 031deeb8..518c1c09 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -31,6 +31,7 @@ jobs: steps: - name: Download the artifact uses: actions/upload-artifact@v3 + with: name: ixa-12345 - name: Run the example run: cargo run --example ${{ matrix.example }} From ffceda615ed570538847b730b86ac12f7a4c06ac Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:24:16 -0800 Subject: [PATCH 07/15] test --- .github/workflows/examples.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 518c1c09..845e6d3f 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -30,7 +30,7 @@ jobs: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] steps: - name: Download the artifact - uses: actions/upload-artifact@v3 + uses: actions/download-artifact@v3 with: name: ixa-12345 - name: Run the example From 4f66b4bce39627e4ab2cf0e4132dcfa1cfb537e4 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:25:19 -0800 Subject: [PATCH 08/15] test --- .github/workflows/examples.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 845e6d3f..da37e7aa 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -21,17 +21,3 @@ jobs: with: name: ixa-12345 path: . - - run_examples: - needs: build - runs-on: ubuntu-latest - strategy: - matrix: - example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] - steps: - - name: Download the artifact - uses: actions/download-artifact@v3 - with: - name: ixa-12345 - - name: Run the example - run: cargo run --example ${{ matrix.example }} From 142fc61dfdb7446593be8ff03d6e24b13423e76c Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:25:37 -0800 Subject: [PATCH 09/15] test --- .github/workflows/examples.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index da37e7aa..0a37ac95 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -15,9 +15,22 @@ jobs: - uses: actions/checkout@v4 - name: Build run: cargo build --verbose - uses: actions/cache@v4 - name: Upload uses: actions/upload-artifact@v3 with: name: ixa-12345 path: . + + run_examples: + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] + steps: + - name: Download the artifact + uses: actions/download-artifact@v3 + with: + name: ixa-12345 + - name: Run the example + run: cargo run --example ${{ matrix.example }} From aa10448642f4651158961a042c5819191e5f8718 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:26:34 -0800 Subject: [PATCH 10/15] fix version} --- .github/workflows/examples.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 0a37ac95..428cacfa 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -16,7 +16,7 @@ jobs: - name: Build run: cargo build --verbose - name: Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ixa-12345 path: . @@ -29,7 +29,7 @@ jobs: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] steps: - name: Download the artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ixa-12345 - name: Run the example From be25ab2f3e03c49d094a5f460c5e3cfe23ce7836 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:33:04 -0800 Subject: [PATCH 11/15] Fail-fast --- .github/workflows/examples.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 428cacfa..a39bfeab 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -27,6 +27,7 @@ jobs: strategy: matrix: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] + fail-fast: false steps: - name: Download the artifact uses: actions/download-artifact@v4 From 24e75e6985bd24a1b58ba323871a856ba2299b11 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:33:58 -0800 Subject: [PATCH 12/15] Fail-fast --- .github/workflows/examples.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index a39bfeab..7da2278b 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -25,9 +25,9 @@ jobs: needs: build runs-on: ubuntu-latest strategy: + fail-fast: false matrix: example: [basic-infection, births-deaths, load-people, network-hhmodel, parameter-loading, random, reports, reports-multi-threaded, runner, time-varying-infection] - fail-fast: false steps: - name: Download the artifact uses: actions/download-artifact@v4 From 80b5cfc86e2d2202d6f80163003489e03d56b161 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:39:56 -0800 Subject: [PATCH 13/15] Unique name} --- .github/workflows/examples.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 7da2278b..12ee6f19 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -18,7 +18,7 @@ jobs: - name: Upload uses: actions/upload-artifact@v4 with: - name: ixa-12345 + name: ixa-build-${{github.run-id}} path: . run_examples: @@ -32,6 +32,6 @@ jobs: - name: Download the artifact uses: actions/download-artifact@v4 with: - name: ixa-12345 + name: ixa-build-${{github.run-id}} - name: Run the example run: cargo run --example ${{ matrix.example }} From 8630299727134b23293a9a617480bf1f280137c1 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:42:28 -0800 Subject: [PATCH 14/15] Do we really need spaces? --- .github/workflows/examples.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 12ee6f19..9ad40798 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -18,7 +18,7 @@ jobs: - name: Upload uses: actions/upload-artifact@v4 with: - name: ixa-build-${{github.run-id}} + name: ixa-build-${{ github.run-id }} path: . run_examples: @@ -32,6 +32,6 @@ jobs: - name: Download the artifact uses: actions/download-artifact@v4 with: - name: ixa-build-${{github.run-id}} + name: ixa-build-${{ github.run-id }} - name: Run the example run: cargo run --example ${{ matrix.example }} From ea7152e326cfd859aa3c281ecdece34cfa62a012 Mon Sep 17 00:00:00 2001 From: Eric Rescorla Date: Wed, 12 Feb 2025 09:43:24 -0800 Subject: [PATCH 15/15] _ not - --- .github/workflows/examples.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 9ad40798..815e1b79 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -18,7 +18,7 @@ jobs: - name: Upload uses: actions/upload-artifact@v4 with: - name: ixa-build-${{ github.run-id }} + name: ixa-build-${{ github.run_id }} path: . run_examples: @@ -32,6 +32,6 @@ jobs: - name: Download the artifact uses: actions/download-artifact@v4 with: - name: ixa-build-${{ github.run-id }} + name: ixa-build-${{ github.run_id }} - name: Run the example run: cargo run --example ${{ matrix.example }}