From 30c75030d6c33755d274792f65ad4add6f1fb289 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 22:47:51 +0200 Subject: [PATCH 1/9] check for docker/podman --- .github/workflows/check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3ad9a44..91a6e50 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -17,4 +17,6 @@ jobs: - run: cargo fmt -- --check - run: cargo build --verbose - run: cargo test --verbose + - run: which docker + - run: which podman From 40b771e65185404583ff90a15783db334541b8ae Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 22:50:56 +0200 Subject: [PATCH 2/9] next try --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 91a6e50..224b37a 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: which docker + - run: which podman - run: cargo fmt -- --check - run: cargo build --verbose - run: cargo test --verbose - - run: which docker - - run: which podman From e6deb588d3eff88434d9a5ab1d4c98c4094c7651 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 22:52:44 +0200 Subject: [PATCH 3/9] next try --- .github/workflows/check.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 224b37a..35ca893 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,9 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: which docker - - run: which podman + - run: make -C container - run: cargo fmt -- --check - - run: cargo build --verbose - - run: cargo test --verbose + - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose + - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose From fb60698336cb0feb3ae06df5ae8e301558a34a1e Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 22:55:41 +0200 Subject: [PATCH 4/9] next try --- .github/workflows/check.yml | 12 +++++++++++- .github/workflows/pages.yml | 25 ------------------------- 2 files changed, 11 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 35ca893..ea0146b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Build and Test +name: Build, Test and generate Doc on: push: @@ -15,7 +15,17 @@ jobs: steps: - uses: actions/checkout@v2 - run: make -C container + - run: cargo fmt -- --check - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose + - name: Generate doc + run: | + cargo doc --no-deps + echo "" > target/doc/index.html + - name: Upload doc to gh pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index 841c0c8..0000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Generate doc and upload pages - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Generate doc - run: | - cargo doc --no-deps - echo "" > target/doc/index.html - - name: Upload doc to gh pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./target/doc From d9a31217029a3bbf6012c522847ebb66959fbfe6 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 23:01:04 +0200 Subject: [PATCH 5/9] multiple jobs --- .github/workflows/check.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ea0146b..3e7e901 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,19 +10,27 @@ env: CARGO_TERM_COLOR: always jobs: - build: + init: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: make -C container + build: + runs-on: ubuntu-latest + needs: init + steps: - run: cargo fmt -- --check - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose + doc: + runs-on: ubuntu-latest + needs: init + steps: - name: Generate doc run: | - cargo doc --no-deps + podman run --rm -it -v $PWD:/work -w /work ks-rs cargo doc --no-deps echo "" > target/doc/index.html - name: Upload doc to gh pages uses: peaceiris/actions-gh-pages@v3 From 1542935f5da66c2e267408c184e86177f0a820c3 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 23:03:51 +0200 Subject: [PATCH 6/9] next try --- .github/workflows/check.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3e7e901..2b33652 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,7 +10,7 @@ env: CARGO_TERM_COLOR: always jobs: - init: + infra: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,16 +18,18 @@ jobs: build: runs-on: ubuntu-latest - needs: init + needs: infra steps: + - uses: actions/checkout@v2 - run: cargo fmt -- --check - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose doc: runs-on: ubuntu-latest - needs: init + needs: infra steps: + - uses: actions/checkout@v2 - name: Generate doc run: | podman run --rm -it -v $PWD:/work -w /work ks-rs cargo doc --no-deps From b9ab6d7f5857f63a92f33050e978305dcc11367c Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 23:06:12 +0200 Subject: [PATCH 7/9] next try --- .github/workflows/check.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2b33652..b7fff19 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,26 +10,16 @@ env: CARGO_TERM_COLOR: always jobs: - infra: + ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: make -C container - build: - runs-on: ubuntu-latest - needs: infra - steps: - - uses: actions/checkout@v2 - run: cargo fmt -- --check - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose - doc: - runs-on: ubuntu-latest - needs: infra - steps: - - uses: actions/checkout@v2 - name: Generate doc run: | podman run --rm -it -v $PWD:/work -w /work ks-rs cargo doc --no-deps From 2cc5b6501a535c4532b6fba64112cf5f9fac5130 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 23:07:03 +0200 Subject: [PATCH 8/9] next try --- .github/workflows/check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b7fff19..724b18d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + PODMAN_RUN: podman run --rm -it -v $PWD:/work -w /work ks-rs jobs: ci: @@ -17,12 +18,12 @@ jobs: - run: make -C container - run: cargo fmt -- --check - - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose - - run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose + - run: $PODMAN_RUN cargo build --verbose + - run: $PODMAN_RUN cargo test --verbose - name: Generate doc run: | - podman run --rm -it -v $PWD:/work -w /work ks-rs cargo doc --no-deps + $PODMAN_RUN cargo doc --no-deps echo "" > target/doc/index.html - name: Upload doc to gh pages uses: peaceiris/actions-gh-pages@v3 From 70eb2d9ae981f4b9b3180ad8469732d8ef7d42ff Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 18 Jul 2024 23:10:02 +0200 Subject: [PATCH 9/9] next try --- .github/workflows/check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 724b18d..126fb81 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -8,7 +8,7 @@ on: env: CARGO_TERM_COLOR: always - PODMAN_RUN: podman run --rm -it -v $PWD:/work -w /work ks-rs + PODMAN_RUN: podman run --rm -t -v $PWD:/work -w /work ks-rs jobs: ci: @@ -18,12 +18,12 @@ jobs: - run: make -C container - run: cargo fmt -- --check - - run: $PODMAN_RUN cargo build --verbose - - run: $PODMAN_RUN cargo test --verbose + - run: eval $PODMAN_RUN cargo build --verbose + - run: eval $PODMAN_RUN cargo test --verbose - name: Generate doc run: | - $PODMAN_RUN cargo doc --no-deps + eval $PODMAN_RUN cargo doc --no-deps echo "" > target/doc/index.html - name: Upload doc to gh pages uses: peaceiris/actions-gh-pages@v3