From 7d274cc2b3b5ea9a4e6955f0f7384279bef3e8f2 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Wed, 10 Jun 2020 11:42:57 +0200 Subject: [PATCH 01/52] maint(ci): Start using github actions for CI This is only the basic rust actions, not all things done by travis currently are covered yet. --- .github/workflows/rust.yml | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..356460484 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,69 @@ +on: [push, pull_request] + +name: Rust + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + + lints: + name: Lints + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings \ No newline at end of file From 307e2268f329dab71cefaa22c4657f3f550b11a1 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Wed, 10 Jun 2020 11:52:27 +0200 Subject: [PATCH 02/52] Enable workspaces, all features and locked Cargo.lock file --- .github/workflows/rust.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 356460484..836de3d67 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,9 +21,10 @@ jobs: uses: actions-rs/cargo@v1 with: command: check + args: --workspace --all-features --locked test: - name: Test Suite + name: Tests runs-on: ubuntu-latest steps: - name: Checkout sources @@ -40,6 +41,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test + args: --workspace --all-features --locked lints: name: Lints From ec5cfa8bb795379f8d6ec815db1db7a6b9f39d6a Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Wed, 10 Jun 2020 11:55:23 +0200 Subject: [PATCH 03/52] Add newline at end of file... --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 836de3d67..36e1b545e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -68,4 +68,4 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: -- -D warnings \ No newline at end of file + args: -- -D warnings From 5c2de661b80166bd86fb817f81f2aac7d503adfa Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 12 Jun 2020 10:01:46 +0200 Subject: [PATCH 04/52] Use our clippy flags --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 36e1b545e..898e9b02b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -68,4 +68,4 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: -- -D warnings + args: --all-features --all --tests --examples -- -D clippy::all From 28ec04fe135ad881e7bee89398d6c09cb43c22aa Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 11:48:11 +0200 Subject: [PATCH 05/52] Limit push build to only build for pushes to master --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 898e9b02b..66fbf2a57 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,8 @@ -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: name: Rust From b8987e1fbd604d50a992578e98ed5d80b527e026 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 16:59:14 +0200 Subject: [PATCH 06/52] Start testing caching --- .github/workflows/rust.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 66fbf2a57..fe33ff462 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,12 +15,21 @@ jobs: uses: actions/checkout@v2 - name: Install stable toolchain + id: toolchain uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true + - name: Cache Rust registry + uses: actions/cache@v2 + env: + cache-name: cache-rust-deps + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock' }} + - name: Run cargo check uses: actions-rs/cargo@v1 with: @@ -41,6 +50,14 @@ jobs: toolchain: stable override: true + - name: Cache Rust dependencies download + uses: actions/cache@v2 + env: + cache-name: cache-rust-deps + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock' }} + - name: Run cargo test uses: actions-rs/cargo@v1 with: From 62aeebe3816753676dec0f884399f70599f82dc8 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 17:04:10 +0200 Subject: [PATCH 07/52] fix typo --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fe33ff462..d358c5bab 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,7 +28,7 @@ jobs: cache-name: cache-rust-deps with: path: ~/.cargo/registry - key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock' }} + key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo check uses: actions-rs/cargo@v1 From 45f5b8f85734d711ad6f9f94b70e047c1559d985 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 17:05:43 +0200 Subject: [PATCH 08/52] Same typo --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d358c5bab..4a55510e1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -56,7 +56,7 @@ jobs: cache-name: cache-rust-deps with: path: ~/.cargo/registry - key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock' }} + key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo test uses: actions-rs/cargo@v1 From 42b372ffeace6854fa1a846bde88c5574c4172fd Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 17:15:58 +0200 Subject: [PATCH 09/52] Also cache build stuff --- .github/workflows/rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4a55510e1..233a0aa44 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,6 +30,12 @@ jobs: path: ~/.cargo/registry key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} + - name: Cache Rust build + uses: actions/cache@v2 + with: + path: ./target + key: target-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_has }}-${{ hashFiles('**/Cargo.lock') }} + - name: Run cargo check uses: actions-rs/cargo@v1 with: From 6bf746b28ab055cbdb43c453ed815969c6b4f10b Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 17:44:38 +0200 Subject: [PATCH 10/52] Try passing caches between jobs using artifacts Using artifacts rather than caches since here we're explicitly including the app build itself. --- .github/workflows/rust.yml | 51 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 233a0aa44..23c3ef672 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,8 +7,8 @@ on: name: Rust jobs: - check: - name: Check + build: + name: Install Rust and build runs-on: ubuntu-latest steps: - name: Checkout sources @@ -22,19 +22,13 @@ jobs: toolchain: stable override: true - - name: Cache Rust registry + - name: Cache Rust registry and build uses: actions/cache@v2 - env: - cache-name: cache-rust-deps with: - path: ~/.cargo/registry - key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache Rust build - uses: actions/cache@v2 - with: - path: ./target - key: target-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_has }}-${{ hashFiles('**/Cargo.lock') }} + path: | + ~/.cargo/registry + ./target + key: rust-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo check uses: actions-rs/cargo@v1 @@ -42,27 +36,36 @@ jobs: command: check args: --workspace --all-features --locked + - name: Cache Cargo + uses: actions/upload-artifact@v2 + with: + name: cargo-cache + path: ~/.cargo + + - name: Cache Rust build + uses: actions/upload-artefact@v2 + with: + name: rust-cache + path: ./target + test: name: Tests + needs: build runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + - name: Restore Cargo cache + uses: actions/download-artifact@v2 with: - profile: minimal - toolchain: stable - override: true + name: cargo-cache + path: ~/ - - name: Cache Rust dependencies download - uses: actions/cache@v2 - env: - cache-name: cache-rust-deps + - name: Restore Rust build cache + uses: actions/download-artifact@v2 with: - path: ~/.cargo/registry - key: ${{ runner.os }}-download-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} + name: rust-cache - name: Run cargo test uses: actions-rs/cargo@v1 From c7a85a4f42bdb99a679fbc6200e7bcb260d9f5f4 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 17:46:54 +0200 Subject: [PATCH 11/52] typo --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 23c3ef672..d4561454f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,7 @@ jobs: path: ~/.cargo - name: Cache Rust build - uses: actions/upload-artefact@v2 + uses: actions/upload-artifact@v2 with: name: rust-cache path: ./target From f4246c7f8b9d6ae96c9babcd722c0f9f02039431 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 17:56:30 +0200 Subject: [PATCH 12/52] Attempt to find where rust actually lives --- .github/workflows/rust.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d4561454f..1904f2a81 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,21 +26,21 @@ jobs: uses: actions/cache@v2 with: path: | - ~/.cargo/registry + /usr/share/rust/.cargo/registry ./target key: rust-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - - name: Run cargo check + - name: Run cargo build uses: actions-rs/cargo@v1 with: - command: check + command: build args: --workspace --all-features --locked - name: Cache Cargo uses: actions/upload-artifact@v2 with: name: cargo-cache - path: ~/.cargo + path: /usr/share/rust/.cargo - name: Cache Rust build uses: actions/upload-artifact@v2 From f094376beb90c41ef2ef05e26a8d88a486c54537 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:15:18 +0200 Subject: [PATCH 13/52] Abandon artifacts, might as well wait for Godot --- .github/workflows/rust.yml | 45 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1904f2a81..6bb0ccfb7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,8 +7,8 @@ on: name: Rust jobs: - build: - name: Install Rust and build + check: + name: Check runs-on: ubuntu-latest steps: - name: Checkout sources @@ -28,7 +28,7 @@ jobs: path: | /usr/share/rust/.cargo/registry ./target - key: rust-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: check-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo build uses: actions-rs/cargo@v1 @@ -36,18 +36,6 @@ jobs: command: build args: --workspace --all-features --locked - - name: Cache Cargo - uses: actions/upload-artifact@v2 - with: - name: cargo-cache - path: /usr/share/rust/.cargo - - - name: Cache Rust build - uses: actions/upload-artifact@v2 - with: - name: rust-cache - path: ./target - test: name: Tests needs: build @@ -56,16 +44,21 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - - name: Restore Cargo cache - uses: actions/download-artifact@v2 + - name: Install stable toolchain + id: toolchain + uses: actions-rs/toolchain@v1 with: - name: cargo-cache - path: ~/ + profile: minimal + toolchain: stable + override: true - - name: Restore Rust build cache - uses: actions/download-artifact@v2 + - name: Cache Rust registry and build + uses: actions/cache@v2 with: - name: rust-cache + path: | + /usr/share/rust/.cargo/registry + ./target + key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo test uses: actions-rs/cargo@v1 @@ -88,6 +81,14 @@ jobs: override: true components: rustfmt, clippy + - name: Cache Rust registry and build + uses: actions/cache@v2 + with: + path: | + /usr/share/rust/.cargo/registry + ./target + key: lints-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + - name: Run cargo fmt uses: actions-rs/cargo@v1 with: From ffbce5f43d5f3486a221f748b5fee5ae28ba867d Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:17:02 +0200 Subject: [PATCH 14/52] Remove unused dependency --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6bb0ccfb7..faeefc685 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,7 +38,6 @@ jobs: test: name: Tests - needs: build runs-on: ubuntu-latest steps: - name: Checkout sources From 35c8161bb5e483e2138fb79204db069e75293fdb Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:25:09 +0200 Subject: [PATCH 15/52] run check, not build --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index faeefc685..4fc590816 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,7 +33,7 @@ jobs: - name: Run cargo build uses: actions-rs/cargo@v1 with: - command: build + command: check args: --workspace --all-features --locked test: From b39509b40345bfc0012b5e6e8996891ee22a94e0 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:29:31 +0200 Subject: [PATCH 16/52] Maybe we don't need to cache the downloaded stuff If the build artefacts are enough then the cache will be smaller and this will be faster. --- .github/workflows/rust.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4fc590816..577c50028 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,11 +26,10 @@ jobs: uses: actions/cache@v2 with: path: | - /usr/share/rust/.cargo/registry ./target - key: check-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: check-v2-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - - name: Run cargo build + - name: Run cargo check uses: actions-rs/cargo@v1 with: command: check @@ -55,9 +54,8 @@ jobs: uses: actions/cache@v2 with: path: | - /usr/share/rust/.cargo/registry ./target - key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: tests-v2-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo test uses: actions-rs/cargo@v1 @@ -84,9 +82,8 @@ jobs: uses: actions/cache@v2 with: path: | - /usr/share/rust/.cargo/registry ./target - key: lints-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: lints-v2-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo fmt uses: actions-rs/cargo@v1 From 2e82d0c3c6eeec76b48749f9d2491e2a8bfb2540 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:41:02 +0200 Subject: [PATCH 17/52] Change for change's sake, I need to see caches working --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 577c50028..d2324bb2b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,7 +22,7 @@ jobs: toolchain: stable override: true - - name: Cache Rust registry and build + - name: Cache build uses: actions/cache@v2 with: path: | @@ -50,7 +50,7 @@ jobs: toolchain: stable override: true - - name: Cache Rust registry and build + - name: Cache build uses: actions/cache@v2 with: path: | @@ -78,7 +78,7 @@ jobs: override: true components: rustfmt, clippy - - name: Cache Rust registry and build + - name: Cache build uses: actions/cache@v2 with: path: | From 461a70c9f9ac4a03eecb461e49a838abd3d91efe Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:45:50 +0200 Subject: [PATCH 18/52] We do need to cache downloads Though unpacking the cache takes longer than downloading a new one... but it's really weird to re-download and then not use them. --- .github/workflows/rust.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d2324bb2b..009c8fd0a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,12 +22,13 @@ jobs: toolchain: stable override: true - - name: Cache build + - name: Cache downloads and build uses: actions/cache@v2 with: path: | + /usr/share/rust/.cargo/registry ./target - key: check-v2-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: check-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo check uses: actions-rs/cargo@v1 @@ -50,12 +51,13 @@ jobs: toolchain: stable override: true - - name: Cache build + - name: Cache downloads and build uses: actions/cache@v2 with: path: | + /usr/share/rust/.cargo/registry ./target - key: tests-v2-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo test uses: actions-rs/cargo@v1 @@ -78,12 +80,13 @@ jobs: override: true components: rustfmt, clippy - - name: Cache build + - name: Cache downloads and build uses: actions/cache@v2 with: path: | + /usr/share/rust/.cargo/registry ./target - key: lints-v2-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: lints-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo fmt uses: actions-rs/cargo@v1 From 78f0f7e2461b21d81761defc1db9cef2048e6733 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 15 Jun 2020 18:47:37 +0200 Subject: [PATCH 19/52] Also cache git downloads --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 009c8fd0a..59c31d952 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,6 +27,7 @@ jobs: with: path: | /usr/share/rust/.cargo/registry + /usr/share/rust/.cargo/git ./target key: check-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} @@ -56,6 +57,7 @@ jobs: with: path: | /usr/share/rust/.cargo/registry + /usr/share/rust/.cargo/git ./target key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} @@ -85,6 +87,7 @@ jobs: with: path: | /usr/share/rust/.cargo/registry + /usr/share/rust/.cargo/git ./target key: lints-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} From e7633be205d30230bc2a39482957a849f30bca20 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 12:13:59 +0200 Subject: [PATCH 20/52] Attempt to run the integration tests as well --- .github/workflows/rust.yml | 12 ++++++++++++ Makefile | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 59c31d952..b398c024c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -61,12 +61,24 @@ jobs: ./target key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + # TODO: Consider using Makefile for this as well. - name: Run cargo test uses: actions-rs/cargo@v1 with: command: test args: --workspace --all-features --locked + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Setup Virtualenv + run: 'python -m pip install virtualenv' + + - name: Integration tests + run: 'make test-integration' + lints: name: Lints runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index e236964ff..13ca1b500 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ test: test-rust test-integration .PHONY: test test-rust: - cargo test --all --all-features --locked + cargo test --workspace --all-features --locked .PHONY: test-rust test-integration: .venv/bin/python From 8d42e5b5dee5fe3170c0aeba099f1050f7149cdc Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:12:22 +0200 Subject: [PATCH 21/52] Add python linting --- .github/workflows/rust.yml | 18 ++++++++++++++++-- Makefile | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b398c024c..4e43d7051 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -107,10 +107,24 @@ jobs: uses: actions-rs/cargo@v1 with: command: fmt - args: --all -- --check + args: --workspace -- --check - name: Run cargo clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --all-features --all --tests --examples -- -D clippy::all + args: --all-features --workspace --tests --examples -- -D clippy::all + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Setup Virtualenv + run: 'python -m pip install virtualenv' + + - name: Python Formatting + run: 'make format-python' + + - name: Python Lints + run: 'make lint-python' diff --git a/Makefile b/Makefile index 13ca1b500..1c786073f 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ lint-python: .venv/bin/python lint-rust: @rustup component add clippy --toolchain stable 2> /dev/null - cargo +stable clippy --all-features --all --tests --examples -- -D clippy::all + cargo +stable clippy --all-features --workspace --tests --examples -- -D clippy::all .PHONY: lint-rust # Formatting From 5b75aa2242f0f9eeea98b5e283454f3c32041989 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:22:11 +0200 Subject: [PATCH 22/52] Fix cargo fmt invocation --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4e43d7051..bece9f8af 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -107,7 +107,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: fmt - args: --workspace -- --check + args: --all -- --check - name: Run cargo clippy uses: actions-rs/cargo@v1 From 1c31851bfa94af69746f22eb26c596645033176e Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:29:27 +0200 Subject: [PATCH 23/52] Split tests in unit and integration tests for more parallelisation Both the unit and integration tests take a while, let's run them in parallel. --- .github/workflows/rust.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bece9f8af..4ba4589a9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,7 +8,7 @@ name: Rust jobs: check: - name: Check + name: Rust Check runs-on: ubuntu-latest steps: - name: Checkout sources @@ -37,8 +37,8 @@ jobs: command: check args: --workspace --all-features --locked - test: - name: Tests + unit-test: + name: Unit Tests runs-on: ubuntu-latest steps: - name: Checkout sources @@ -68,6 +68,21 @@ jobs: command: test args: --workspace --all-features --locked + integration-test: + name: Integration Tests + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + id: toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Setup Python uses: actions/setup-python@v2 with: @@ -76,6 +91,15 @@ jobs: - name: Setup Virtualenv run: 'python -m pip install virtualenv' + - name: Cache downloads and build + uses: actions/cache@v2 + with: + path: | + /usr/share/rust/.cargo/registry + /usr/share/rust/.cargo/git + ./target + key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + - name: Integration tests run: 'make test-integration' From c3ecc44db3101c83d04cf3ef511c21d26aed191c Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:32:39 +0200 Subject: [PATCH 24/52] Rename to ci, no longer just rust-specific --- .github/workflows/{rust.yml => ci.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{rust.yml => ci.yml} (100%) diff --git a/.github/workflows/rust.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/rust.yml rename to .github/workflows/ci.yml From a9abbf76e0ae714f41fbdac7a8229f454cfdfa10 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:34:25 +0200 Subject: [PATCH 25/52] Also rename the workfolow instead of only the file The workflow name is what is actually used in the UI. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ba4589a9..0245b46ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: - master pull_request: -name: Rust +name: CI jobs: check: From c2c818ff3f68dd3c9cb6c77496ceb3b813eb3174 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:42:32 +0200 Subject: [PATCH 26/52] Use unique cache keys for both tests suites --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0245b46ab..594a8219c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: /usr/share/rust/.cargo/registry /usr/share/rust/.cargo/git ./target - key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: unit-tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} # TODO: Consider using Makefile for this as well. - name: Run cargo test @@ -98,7 +98,7 @@ jobs: /usr/share/rust/.cargo/registry /usr/share/rust/.cargo/git ./target - key: tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: integration-tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Integration tests run: 'make test-integration' From cc75a77bd541d0a41486ede4bd8457bdb87a9f32 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 15:55:51 +0200 Subject: [PATCH 27/52] Build the docs --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 594a8219c..28878cea8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,3 +152,21 @@ jobs: - name: Python Lints run: 'make lint-python' + + docs: + name: Docs + runs-on: ubunut-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Setup Virtualenv + run: 'python -m pip install virtualenv' + + - name: Build Docs + run: 'make docs' From a2da55736211c3e07f449c7eef123360725823a4 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 3 Aug 2020 16:12:10 +0200 Subject: [PATCH 28/52] Spell ubuntu correctly... --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28878cea8..023bedbfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,7 @@ jobs: docs: name: Docs - runs-on: ubunut-latest + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 From 638345975ce15b7438c427d2c942fb0912e98953 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 10 Aug 2020 16:23:29 +0200 Subject: [PATCH 29/52] Do not allow skipping tests with credentials on CI When running on CI we really shouldn't accidentally skip tests, so we add a new --ci option which does not allow skipping tests when this option is present. The makefile needs to work both for users as for the CI so add in a backdoor to get commandline arguments into there. --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- pytest.ini | 2 +- tests/integration/conftest.py | 26 ++++++++++++++++++++++---- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 023bedbfe..0344f231f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: key: integration-tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Integration tests - run: 'make test-integration' + run: 'make test-integration CI_ARGS="--ci"' lints: name: Lints diff --git a/Makefile b/Makefile index 1c786073f..0e541500b 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ test-rust: test-integration: .venv/bin/python .venv/bin/pip install -U pytest pytest-localserver requests pytest-xdist pytest-icdiff boto3 cargo build --locked - @.venv/bin/pytest tests -n12 -vv + @.venv/bin/pytest $(CI_ARGS) tests/integration -n12 -vv .PHONY: test-integration # Documentation diff --git a/pytest.ini b/pytest.ini index 08cd281a2..4926673ec 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] addopts = -ra --tb=native --durations 5 -p no:warnings -testpaths = tests +testpaths = tests/integration markers = extra_failure_checks: Marker which can add additional failure checks to a test. It accepts the keyword argument `checks` which should be a diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 337a6238f..31d1200c4 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -25,6 +25,16 @@ session = requests.session() +@pytest.hookimpl +def pytest_addoption(parser): + parser.addoption( + "--ci", + action="store_true", + help="Indicate the tests are being run on CI, " + "this e.g. prefers to fail tests instead of skipping them.", + ) + + @pytest.hookimpl def pytest_sessionstart(session): no_fds_soft, no_fds_hard = resource.getrlimit(resource.RLIMIT_NOFILE) @@ -271,9 +281,13 @@ def fail_on_errors(): @pytest.fixture -def s3(): +def s3(pytestconfig): if not AWS_ACCESS_KEY_ID or not AWS_SECRET_ACCESS_KEY: - pytest.skip("No AWS credentials") + msg = "No AWS credentials" + if pytestconfig.getoption("ci"): + pytest.fail(msg) + else: + pytest.skip(msg) return boto3.resource( "s3", aws_access_key_id=AWS_ACCESS_KEY_ID, @@ -299,9 +313,13 @@ def s3_bucket_config(s3): @pytest.fixture -def ios_bucket_config(): +def ios_bucket_config(pytestconfig): if not GCS_PRIVATE_KEY or not GCS_CLIENT_EMAIL: - pytest.skip("No GCS credentials") + msg = "No GCS credentials" + if pytestconfig.getoption("ci"): + pytest.fail(msg) + else: + pytest.skip(msg) yield { "id": "ios", "type": "gcs", From a31286d4075a4253389f13a7955fe6090a3fed83 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Tue, 11 Aug 2020 10:39:54 +0200 Subject: [PATCH 30/52] Configure the secrets as env vars --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0344f231f..3e29adef8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,6 +101,11 @@ jobs: key: integration-tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - name: Integration tests + env: + SENTRY_SYMBOLICATOR_GCS_CLIENT_EMAIL: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_CLIENT_EMAIL }} + SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY }} + SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID }} + SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY }} run: 'make test-integration CI_ARGS="--ci"' lints: From d4b4681fa0a432e4ee8bd7773f176723c9451bb2 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Thu, 1 Oct 2020 15:32:03 +0200 Subject: [PATCH 31/52] Update some stuff for the sake of it honestly --- .github/workflows/ci.yml | 164 ++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 97 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e29adef8..ab590da48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,35 +1,70 @@ +name: CI + on: push: branches: - master - pull_request: + - release/** -name: CI + pull_request: jobs: + lints: + name: Lints + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install Python Dependencies + run: pip install --upgrade black flake8 + + - name: Run Black + run: black --check tests + + - name: Run Flake8 + run: flake8 tests + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + components: rustfmt, clippy + override: true + + - uses: Swatinem/rust-cache@v1 + with: + key: lints + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features --workspace --tests --examples -- -D clippy::all + check: name: Rust Check runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Install stable toolchain - id: toolchain - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@v1 with: - profile: minimal toolchain: stable + profile: minimal override: true - - name: Cache downloads and build - uses: actions/cache@v2 + - uses: Swatinem/rust-cache@v1 with: - path: | - /usr/share/rust/.cargo/registry - /usr/share/rust/.cargo/git - ./target - key: check-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: check - name: Run cargo check uses: actions-rs/cargo@v1 @@ -45,23 +80,16 @@ jobs: uses: actions/checkout@v2 - name: Install stable toolchain - id: toolchain uses: actions-rs/toolchain@v1 with: - profile: minimal toolchain: stable + profile: minimal override: true - - name: Cache downloads and build - uses: actions/cache@v2 + - uses: Swatinem/rust-cache@v1 with: - path: | - /usr/share/rust/.cargo/registry - /usr/share/rust/.cargo/git - ./target - key: unit-tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + key: unit-test - # TODO: Consider using Makefile for this as well. - name: Run cargo test uses: actions-rs/cargo@v1 with: @@ -72,33 +100,24 @@ jobs: name: Integration Tests runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Install stable toolchain - id: toolchain - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@v1 with: - profile: minimal toolchain: stable + profile: minimal override: true - - name: Setup Python - uses: actions/setup-python@v2 + - uses: Swatinem/rust-cache@v1 with: - python-version: '3.8' + key: integration-test - - name: Setup Virtualenv - run: 'python -m pip install virtualenv' - - - name: Cache downloads and build - uses: actions/cache@v2 + - uses: actions/setup-python@v2 with: - path: | - /usr/share/rust/.cargo/registry - /usr/share/rust/.cargo/git - ./target - key: integration-tests-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} + python-version: 3.8 + + - name: Setup Virtualenv + run: pip install virtualenv - name: Integration tests env: @@ -106,57 +125,8 @@ jobs: SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY }} SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID }} SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY }} - run: 'make test-integration CI_ARGS="--ci"' - - lints: - name: Lints - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt, clippy - - - name: Cache downloads and build - uses: actions/cache@v2 - with: - path: | - /usr/share/rust/.cargo/registry - /usr/share/rust/.cargo/git - ./target - key: lints-${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-lock-${{ hashFiles('**/Cargo.lock') }} - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features --workspace --tests --examples -- -D clippy::all - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - - name: Setup Virtualenv - run: 'python -m pip install virtualenv' - - - name: Python Formatting - run: 'make format-python' + run: make test-integration CI_ARGS="--ci" - - name: Python Lints - run: 'make lint-python' docs: name: Docs @@ -168,10 +138,10 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: 3.8 - name: Setup Virtualenv - run: 'python -m pip install virtualenv' + run: pip install virtualenv - name: Build Docs - run: 'make docs' + run: make docs From e20f55be923de4503bccb93bf86443d336155536 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Thu, 1 Oct 2020 15:54:34 +0200 Subject: [PATCH 32/52] Give things names again --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab590da48..75e16b3a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,15 @@ jobs: name: Lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout sources + uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - name: Install python + uses: actions/setup-python@v2 with: python-version: 3.8 - - name: Install Python Dependencies + - name: Install python dependencies run: pip install --upgrade black flake8 - name: Run Black @@ -28,14 +30,16 @@ jobs: - name: Run Flake8 run: flake8 tests - - uses: actions-rs/toolchain@v1 + - name: Install rust stable toolchain + uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal components: rustfmt, clippy override: true - - uses: Swatinem/rust-cache@v1 + - name: Chache rust cargo artifacts + uses: Swatinem/rust-cache@v1 with: key: lints @@ -45,7 +49,8 @@ jobs: command: fmt args: --all -- --check - - uses: actions-rs/clippy-check@v1 + - name: Run clipppy + uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features --workspace --tests --examples -- -D clippy::all @@ -54,15 +59,18 @@ jobs: name: Rust Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout sources + uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - name: Install rust stable toolchain + uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true - - uses: Swatinem/rust-cache@v1 + - name: Cache rust cargo artifacts + uses: Swatinem/rust-cache@v1 with: key: check @@ -79,14 +87,15 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - - name: Install stable toolchain + - name: Install rust stable toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true - - uses: Swatinem/rust-cache@v1 + - name: Cache rust cargo artifacts + uses: Swatinem/rust-cache@v1 with: key: unit-test @@ -100,19 +109,23 @@ jobs: name: Integration Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout sources + uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - name: Install rust stable toolchain + uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true - - uses: Swatinem/rust-cache@v1 + - name: Cache rust cargo artifacts + uses: Swatinem/rust-cache@v1 with: key: integration-test - - uses: actions/setup-python@v2 + - name: Install python + uses: actions/setup-python@v2 with: python-version: 3.8 From d5056bce1893725056da24b96656890ceb5c390f Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Thu, 1 Oct 2020 16:20:02 +0200 Subject: [PATCH 33/52] Put some upload stuff in there The secrets do not exist, so this'll just fail --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75e16b3a5..72ae99ba3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,3 +158,35 @@ jobs: - name: Build Docs run: make docs + + upload-docs: + name: Upload Docs + runs-on: ubuntu-latest + if: "contains(github.ref, 'release/')" + needs: docs + steps: + + - uses: actions/setup-node@v1 + + - uses: actions/cache@v2 + with: + path: | + ${{ github.workspace }}/node_modules + ${{ github.workspace }}/packages/**/node_modules + ${{ github.workspace }}/packages/**/build + ${{ github.workspace }}/packages/**/dist + ${{ github.workspace }}/packages/**/esm + key: ${{ runner.os }}-${{ github.sha }} + + - name: Install Zeus + run: | + yarn global add @zeus-ci/cli + echo "::add-path::$(yarn global bin)" + + - name: Upload docs + env: + ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }} + ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }} + run: | + cd site && zip -r gh-pages . + zeus upload -t "application/zip+docs" site/gh-pages.zip From 1f428b990dc6c725671e9685a1939d0eb08659b3 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 08:45:55 +0200 Subject: [PATCH 34/52] Update .github/workflows/ci.yml Co-authored-by: Jan Michael Auer --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72ae99ba3..609e7c877 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: components: rustfmt, clippy override: true - - name: Chache rust cargo artifacts + - name: Cache rust cargo artifacts uses: Swatinem/rust-cache@v1 with: key: lints From 4295645bf5b58c1615ec63ac12e0d03fc3f2f317 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 08:51:33 +0200 Subject: [PATCH 35/52] Update .github/workflows/ci.yml Co-authored-by: Jan Michael Auer --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 609e7c877..8ad3e80e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,7 @@ jobs: upload-docs: name: Upload Docs runs-on: ubuntu-latest - if: "contains(github.ref, 'release/')" + if: "startsWith(github.ref, 'release/')" needs: docs steps: From cba53ccc78fde6cb7b4705e0362dcca229dea9e0 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:31:56 +0200 Subject: [PATCH 36/52] Add release workflow to upload docs Some other minor cleanups --- .github/workflows/build.yml | 41 ++++++++++++++++++++++ .github/workflows/ci.yml | 69 ++++--------------------------------- 2 files changed, 48 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..94ab10997 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Binary release build + +on: + push: + branches: + - release/** + + # DO NOT MERGE WITH THIS IN IT + pull_request: + +jobs: + linux: + name: Linux + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Setup Virtualenv + run: pip install virtualenv + + - name: Build Docs + run: make docs + + - name: Setup node + uses: actions/setup-node@v1 + + - name: Upload to Zeus + env: + ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }} + run: | + yarn global add @zeus-ci/cli + npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" -n site/gh-pages.zip + npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ad3e80e5..07a9cf9be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,31 +55,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features --workspace --tests --examples -- -D clippy::all - check: - name: Rust Check - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install rust stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - - - name: Cache rust cargo artifacts - uses: Swatinem/rust-cache@v1 - with: - key: check - - - name: Run cargo check - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-features --locked - unit-test: name: Unit Tests runs-on: ubuntu-latest @@ -124,13 +99,16 @@ jobs: with: key: integration-test + - name: Build rust + run: cargo build --locked + - name: Install python uses: actions/setup-python@v2 with: python-version: 3.8 - - name: Setup Virtualenv - run: pip install virtualenv + - name: Setup python environment + run: pip install --upgrade pytest pytest-localserver requests pytest-xdist pytest-icdiff boto3 - name: Integration tests env: @@ -138,11 +116,10 @@ jobs: SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY }} SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID }} SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY }} - run: make test-integration CI_ARGS="--ci" - + run: pytest --ci -n12 -vv tests/integration docs: - name: Docs + name: Build docs runs-on: ubuntu-latest steps: - name: Checkout sources @@ -158,35 +135,3 @@ jobs: - name: Build Docs run: make docs - - upload-docs: - name: Upload Docs - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'release/')" - needs: docs - steps: - - - uses: actions/setup-node@v1 - - - uses: actions/cache@v2 - with: - path: | - ${{ github.workspace }}/node_modules - ${{ github.workspace }}/packages/**/node_modules - ${{ github.workspace }}/packages/**/build - ${{ github.workspace }}/packages/**/dist - ${{ github.workspace }}/packages/**/esm - key: ${{ runner.os }}-${{ github.sha }} - - - name: Install Zeus - run: | - yarn global add @zeus-ci/cli - echo "::add-path::$(yarn global bin)" - - - name: Upload docs - env: - ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }} - ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }} - run: | - cd site && zip -r gh-pages . - zeus upload -t "application/zip+docs" site/gh-pages.zip From ce0e9e6b1b48372da640b6cec7ed4c39a7552b02 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:33:11 +0200 Subject: [PATCH 37/52] Use the job_id for cache key --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07a9cf9be..b1f4f620a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,9 +39,9 @@ jobs: override: true - name: Cache rust cargo artifacts - uses: Swatinem/rust-cache@v1 + uses: swatinem/rust-cache@v1 with: - key: lints + key: {{ github.job }} - name: Run cargo fmt uses: actions-rs/cargo@v1 @@ -70,9 +70,9 @@ jobs: override: true - name: Cache rust cargo artifacts - uses: Swatinem/rust-cache@v1 + uses: swatinem/rust-cache@v1 with: - key: unit-test + key: {{ github.job }} - name: Run cargo test uses: actions-rs/cargo@v1 @@ -95,9 +95,9 @@ jobs: override: true - name: Cache rust cargo artifacts - uses: Swatinem/rust-cache@v1 + uses: swatinem/rust-cache@v1 with: - key: integration-test + key: {{ github.job }} - name: Build rust run: cargo build --locked From 50f113543d7b15b79cd7b9518714a2bb6c2a645f Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:40:43 +0200 Subject: [PATCH 38/52] Correct syntax --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1f4f620a..d37397890 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: - name: Cache rust cargo artifacts uses: swatinem/rust-cache@v1 with: - key: {{ github.job }} + key: ${{ github.job }} - name: Run cargo fmt uses: actions-rs/cargo@v1 @@ -72,7 +72,7 @@ jobs: - name: Cache rust cargo artifacts uses: swatinem/rust-cache@v1 with: - key: {{ github.job }} + key: ${{ github.job }} - name: Run cargo test uses: actions-rs/cargo@v1 @@ -97,7 +97,7 @@ jobs: - name: Cache rust cargo artifacts uses: swatinem/rust-cache@v1 with: - key: {{ github.job }} + key: ${{ github.job }} - name: Build rust run: cargo build --locked From 82b7b1409fbbe799aac4403e09cf44241a9e57b9 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:48:51 +0200 Subject: [PATCH 39/52] Less confusing name We don't (yet) build a binary. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94ab10997..a971afec3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Binary release build +name: Release build on: push: From 561bb8bba6aff74c8bf826bbb386f0bec93fa5ee Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:54:14 +0200 Subject: [PATCH 40/52] Use zeus directly --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a971afec3..b15c3a0a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,6 @@ jobs: ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }} run: | yarn global add @zeus-ci/cli - npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} - npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" -n site/gh-pages.zip - npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} + zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} + zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" -n site/gh-pages.zip + zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} From b3d10bb3f2bd6aa780e2afaa92838a925a866072 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:56:17 +0200 Subject: [PATCH 41/52] Use npx instead of yarn --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b15c3a0a8..a00bdc788 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: env: ZEUS_HOOK_BASE: ${{ secrets.ZEUS_HOOK_BASE }} run: | - yarn global add @zeus-ci/cli - zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} - zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" -n site/gh-pages.zip - zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} + npm install -D @zeus-ci/cli + npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" -n site/gh-pages.zip + npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} From 52dbb17a285e0e5104eb166c896ff115702ef8d0 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 09:59:21 +0200 Subject: [PATCH 42/52] Do not name the upload The makefile also didn't do this. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a00bdc788..51c3a03e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,5 +37,5 @@ jobs: run: | npm install -D @zeus-ci/cli npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} - npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" -n site/gh-pages.zip + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" site/gh-pages.zip npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} From 2eb130e2ac0256325ca4607b3f918857abb045dd Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 10:11:58 +0200 Subject: [PATCH 43/52] Actually zip up the docs --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51c3a03e3..7ae5622b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,9 @@ jobs: run: pip install virtualenv - name: Build Docs - run: make docs + run: | + make docs + cd site && zip -r gh-pages . - name: Setup node uses: actions/setup-node@v1 From 9ede8d1c261c7bf01f84d0387339ddedc62db0d6 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 10:14:25 +0200 Subject: [PATCH 44/52] Remove travis config --- .travis.yml | 56 ----------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6e220b269..000000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -os: linux -dist: xenial -language: rust - -before_install: - - pyenv install 3.6.3 - - pyenv global 3.6.3 - -git: - depth: 1 - -branches: - only: - - master - - /^release\/[\d.]+$/ - -env: - - CXX=clang - -jobs: - include: - - name: "style check" - script: make -e style - - - name: "lint" - script: make -e lint - - - name: "test" - script: make -e test-rust - - - name: "e2e" - script: make -e test-integration - - - name: "release: linux x86_64" - if: branch ~= /^release\/[\d.]+$/ - before_script: npm install -g @zeus-ci/cli - script: - - make release - - zeus upload -t "application/octet-stream" -n symbolicator-Linux-x86_64 target/release/symbolicator - - zip symbolicator-debug.zip target/symbolicator/symbolicator.debug - - zeus upload -t "application/octet-stream" -n symbolicator-Linux-x86_64-debug.zip symbolicator-debug.zip - - - name: "release: docs" - if: branch ~= /^release\/[\d.]+$/ - before_script: npm install -g @zeus-ci/cli - script: make -e travis-upload-docs - -notifications: - webhooks: - urls: - - https://zeus.ci/hooks/53a70baa-5131-11e9-902b-0a580a282506/public/provider/travis/webhook - on_success: always - on_failure: always - on_start: always - on_cancel: always - on_error: always From eafab8a56a98eadf73a002849efb90b68a703d03 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 10:15:03 +0200 Subject: [PATCH 45/52] Remove test setup We don't actually want to upload docs for normal PRs --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ae5622b9..555185373 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ on: branches: - release/** - # DO NOT MERGE WITH THIS IN IT - pull_request: - jobs: linux: name: Linux From a090f8c70e249d79bcd65ff4a67efec5ebd3a32d Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 10:59:49 +0200 Subject: [PATCH 46/52] More suitable name --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 555185373..c7abb0b51 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,8 @@ on: - release/** jobs: - linux: - name: Linux + docs: + name: Upload docs runs-on: ubuntu-latest steps: From 6045095e4115d1bb5253c7f3ba32f86cffb577a4 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 2 Oct 2020 17:09:03 +0200 Subject: [PATCH 47/52] Do not require binaries for releases Nothing currently produces these binaries, this is currently broken. --- .craft.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.craft.yml b/.craft.yml index 5c2ec98b3..2a405eae4 100644 --- a/.craft.yml +++ b/.craft.yml @@ -32,5 +32,3 @@ targets: requireNames: - /^gh-pages.zip$/ - - /^symbolicator-Linux-x86_64$/ - - /^symbolicator-Linux-x86_64-debug.zip$/ From 75c176f1a2585cd0fa39695c166295aae73e8a34 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 5 Oct 2020 10:37:26 +0200 Subject: [PATCH 48/52] Build binaries again I was mistaken that this wasn't currently done. Let's keep it. --- .craft.yml | 2 ++ .github/workflows/build.yml | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.craft.yml b/.craft.yml index 2a405eae4..5c2ec98b3 100644 --- a/.craft.yml +++ b/.craft.yml @@ -32,3 +32,5 @@ targets: requireNames: - /^gh-pages.zip$/ + - /^symbolicator-Linux-x86_64$/ + - /^symbolicator-Linux-x86_64-debug.zip$/ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7abb0b51..bfc3ea9ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,15 +5,26 @@ on: branches: - release/** + # DO NOT MERGE LIKE THIS + pull_request: + jobs: docs: - name: Upload docs + name: Build and upload Linux release and docs runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 + - name: Build symbolicator + run: | + cargo build --release + objcopy --only-keep-debug target/release/symbolicator{,.debug} + objcopy --strip-debug --strip-unneeded target/release/symbolicator + objcopy --add-gnu-debuglink target/release/symbolicator{.debug,} + zip symbolicator-debug.zip target/release/symbolicator.debug + - name: Setup Python uses: actions/setup-python@v2 with: @@ -36,5 +47,7 @@ jobs: run: | npm install -D @zeus-ci/cli npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/octet-stream" -n symbolicator-Linux-x86_64 target/x86_64-unknown-linux-gnu/release/symbolicator + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip -n symbolicator-Linux-x86_64-debug.zip symbolicator-debug.zip npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" site/gh-pages.zip npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} From 49dc5efcf9831b9ffe3e465a2e8f16414eea4557 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 5 Oct 2020 10:51:21 +0200 Subject: [PATCH 49/52] Do not use makefile for docs building Apparently we now have CI independently from the Makefile. --- .github/workflows/build.yml | 10 ++++------ .github/workflows/ci.yml | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfc3ea9ec..45da444e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ on: branches: - release/** - # DO NOT MERGE LIKE THIS - pull_request: - jobs: docs: name: Build and upload Linux release and docs @@ -30,12 +27,13 @@ jobs: with: python-version: 3.8 - - name: Setup Virtualenv - run: pip install virtualenv + - name: Setup python dependencies + run: pip install --upgrade mkdocs mkdocs-material pygments - name: Build Docs run: | - make docs + mkdocs build + touch site/.nojekyll cd site && zip -r gh-pages . - name: Setup node diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d37397890..405156274 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,8 +130,8 @@ jobs: with: python-version: 3.8 - - name: Setup Virtualenv - run: pip install virtualenv + - name: Setup python dependencies + run: pip install --upgrade mkdocs mkdocs-material pygments - name: Build Docs - run: make docs + run: mkdocs build From 60088f39d13f482a9fd12878217eaca61440128c Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 5 Oct 2020 11:02:22 +0200 Subject: [PATCH 50/52] Correct release binary location --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45da444e9..18ebfae12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: branches: - release/** + # DO NOT MERGE WITH THIS + pull_request: + jobs: docs: name: Build and upload Linux release and docs @@ -45,7 +48,7 @@ jobs: run: | npm install -D @zeus-ci/cli npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} - npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/octet-stream" -n symbolicator-Linux-x86_64 target/x86_64-unknown-linux-gnu/release/symbolicator + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/octet-stream" -n symbolicator-Linux-x86_64 target/release/symbolicator npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip -n symbolicator-Linux-x86_64-debug.zip symbolicator-debug.zip npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" site/gh-pages.zip npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} From bc5771b4be663ca1ad6d5c22fa6121b2459cb228 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 5 Oct 2020 11:41:29 +0200 Subject: [PATCH 51/52] Quotes are hard --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18ebfae12..466687c72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,6 +49,6 @@ jobs: npm install -D @zeus-ci/cli npx zeus job update -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/octet-stream" -n symbolicator-Linux-x86_64 target/release/symbolicator - npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip -n symbolicator-Linux-x86_64-debug.zip symbolicator-debug.zip + npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip" -n symbolicator-Linux-x86_64-debug.zip symbolicator-debug.zip npx zeus upload -b ${{ github.run_id }} -j ${{ github.job }} -t "application/zip+docs" site/gh-pages.zip npx zeus job update --status=passed -b ${{ github.run_id }} -j ${{ github.job }} -r ${{ github.sha }} From f11e8670938ed6903db0b62134da0031c22b3aab Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 5 Oct 2020 12:04:49 +0200 Subject: [PATCH 52/52] Remove temp test config --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 466687c72..3a4c94c2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ on: branches: - release/** - # DO NOT MERGE WITH THIS - pull_request: - jobs: docs: name: Build and upload Linux release and docs