Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
ci: Make workflow names consistent
Alexis Sellier committed 3 years ago
commit 079c193d0c820ed6d16899ed539df89bd462d20f
parent 8318b07d89414df3479652383e9dcad185910bc4
7 files changed +286 -286
deleted .github/workflows/actions.yml
@@ -1,74 +0,0 @@
-
name: CI
-

-
on:
-
  push:
-
    branches: [master]
-
  pull_request:
-
    branches: [master]
-

-
jobs:
-
  build:
-
    name: Build & Test
-
    runs-on: ubuntu-latest
-
    steps:
-
      - uses: actions/checkout@v3
-
      - uses: actions-rs/toolchain@v1
-
        with:
-
          profile: minimal
-
          toolchain: 1.66
-
      - name: Build
-
        run: cargo build --verbose --all-features
-
        env:
-
          RUSTFLAGS: -D warnings
-
      - name: Run tests
-
        run: |
-
          cargo test --all --verbose --all-features
-

-
          # Workaround for client document tests dependent on the remote
-
          # helper. Tests which rely on these should be marked #[ignore] and
-
          # whitelisted here.
-
          #
-
          # Marking them as 'ignored' will allow local testing to work as
-
          # expected, yet allow these document tests to be covered during
-
          # integration testing.
-
          cargo install --locked --debug --path ./radicle-remote-helper
-
          cargo test --all --verbose --all-features rad_patch -- --ignored
-

-
  docs:
-
    name: Docs
-
    runs-on: ubuntu-latest
-
    steps:
-
      - uses: actions/checkout@v3
-
      - uses: actions-rs/toolchain@v1
-
      - name: Docs
-
        run: cargo doc --all --all-features
-
        env:
-
          RUSTDOCFLAGS: -D warnings
-

-
  lint:
-
    name: Lint
-
    runs-on: ubuntu-latest
-
    steps:
-
      - uses: actions/checkout@v3
-
      - uses: actions-rs/toolchain@v1
-
        with:
-
          profile: minimal
-
          components: clippy, rustfmt
-
          toolchain: 1.66
-
      - name: Cache cargo registry
-
        uses: actions/cache@v3
-
        with:
-
          path: ~/.cargo/registry
-
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
-
      - name: Run clippy
-
        uses: actions-rs/cargo@v1
-
        with:
-
          command: clippy
-
          args: --all --tests
-
        env:
-
          RUSTFLAGS: -D warnings
-
      - name: Check formating
-
        uses: actions-rs/cargo@v1
-
        with:
-
          command: fmt
-
          args: --all -- --check
added .github/workflows/ci.yaml
@@ -0,0 +1,74 @@
+
name: CI
+

+
on:
+
  push:
+
    branches: [master]
+
  pull_request:
+
    branches: [master]
+

+
jobs:
+
  build:
+
    name: Build & Test
+
    runs-on: ubuntu-latest
+
    steps:
+
      - uses: actions/checkout@v3
+
      - uses: actions-rs/toolchain@v1
+
        with:
+
          profile: minimal
+
          toolchain: 1.66
+
      - name: Build
+
        run: cargo build --verbose --all-features
+
        env:
+
          RUSTFLAGS: -D warnings
+
      - name: Run tests
+
        run: |
+
          cargo test --all --verbose --all-features
+

+
          # Workaround for client document tests dependent on the remote
+
          # helper. Tests which rely on these should be marked #[ignore] and
+
          # whitelisted here.
+
          #
+
          # Marking them as 'ignored' will allow local testing to work as
+
          # expected, yet allow these document tests to be covered during
+
          # integration testing.
+
          cargo install --locked --debug --path ./radicle-remote-helper
+
          cargo test --all --verbose --all-features rad_patch -- --ignored
+

+
  docs:
+
    name: Docs
+
    runs-on: ubuntu-latest
+
    steps:
+
      - uses: actions/checkout@v3
+
      - uses: actions-rs/toolchain@v1
+
      - name: Docs
+
        run: cargo doc --all --all-features
+
        env:
+
          RUSTDOCFLAGS: -D warnings
+

+
  lint:
+
    name: Lint
+
    runs-on: ubuntu-latest
+
    steps:
+
      - uses: actions/checkout@v3
+
      - uses: actions-rs/toolchain@v1
+
        with:
+
          profile: minimal
+
          components: clippy, rustfmt
+
          toolchain: 1.66
+
      - name: Cache cargo registry
+
        uses: actions/cache@v3
+
        with:
+
          path: ~/.cargo/registry
+
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
+
      - name: Run clippy
+
        uses: actions-rs/cargo@v1
+
        with:
+
          command: clippy
+
          args: --all --tests
+
        env:
+
          RUSTFLAGS: -D warnings
+
      - name: Check formating
+
        uses: actions-rs/cargo@v1
+
        with:
+
          command: fmt
+
          args: --all -- --check
modified .github/workflows/deploy.yml
@@ -1,4 +1,4 @@
-
name: Build and push container images
+
name: Deploy

on:
  push:
deleted .github/workflows/frontend-testing.yml
@@ -1,85 +0,0 @@
-
name: Upload binaries for frontend e2e tests
-

-
on:
-
  push:
-
    branches: [master]
-

-
jobs:
-
  release-gcloud-x86_64-linux-binaries:
-
    permissions:
-
      contents: 'read'
-
      id-token: 'write'
-
    runs-on: ubuntu-20.04
-
    steps:
-
      - name: Checkout source code
-
        uses: actions/checkout@v3
-
      - name: Configure build cache
-
        uses: actions/cache@v3
-
        with:
-
          path: |
-
            ~/.cargo/registry
-
            ~/.cargo/git
-
            target
-
          key: cargo-x86_64-linux-${{ hashFiles('**/Cargo.lock') }}
-
      - name: Build the binaries
-
        uses: addnab/docker-run-action@v3
-
        with:
-
          image: registry.gitlab.com/rust_musl_docker/image:stable-latest
-
          options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
-
          run: |
-
            rustup target add x86_64-unknown-linux-musl
-
            cd radicle-httpd
-
            cargo build --release --target=x86_64-unknown-linux-musl
-
            chmod --recursive go+r /root/.cargo/registry
-
      - id: 'auth'
-
        uses: 'google-github-actions/auth@v1'
-
        with:
-
          workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
-
          service_account: 'github-actions@radicle-services.iam.gserviceaccount.com'
-
      - name: 'Set up Cloud SDK'
-
        uses: 'google-github-actions/setup-gcloud@v1'
-
      - id: 'upload-file'
-
        uses: 'google-github-actions/upload-cloud-storage@v1'
-
        with:
-
          path: target/x86_64-unknown-linux-musl/release/radicle-httpd
-
          destination: heartwood-artifacts/${{ github.sha }}/
-

-
  release-gcloud-macos-binaries:
-
    permissions:
-
      contents: 'read'
-
      id-token: 'write'
-
    runs-on: macos-11
-
    strategy:
-
      matrix:
-
        target:
-
          - aarch64-apple-darwin
-
    steps:
-
      - uses: actions/checkout@v3
-
      - name: Configure build cache
-
        uses: actions/cache@v3
-
        with:
-
          path: |
-
            ~/.cargo/registry
-
            ~/.cargo/git
-
            target
-
          key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
-
      - uses: actions-rs/toolchain@v1
-
        with:
-
          profile: minimal
-
          target: ${{ matrix.target }}
-
      - name: Build the release binaries
-
        run: |
-
          cd radicle-httpd
-
          cargo build --release --target ${{ matrix.target }}
-
      - id: 'auth'
-
        uses: 'google-github-actions/auth@v1'
-
        with:
-
          workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
-
          service_account: 'github-actions@radicle-services.iam.gserviceaccount.com'
-
      - name: 'Set up Cloud SDK'
-
        uses: 'google-github-actions/setup-gcloud@v1'
-
      - id: 'upload-file'
-
        uses: 'google-github-actions/upload-cloud-storage@v1'
-
        with:
-
          path: target/${{ matrix.target }}/release/radicle-httpd
-
          destination: heartwood-artifacts/${{ github.sha }}/${{ matrix.target }}/
added .github/workflows/release-cli.yml
@@ -0,0 +1,126 @@
+
name: Release / cli
+
on:
+
  push:
+
    tags:
+
      - "[0-9]+.[0-9]+.[0-9]+"
+

+
jobs:
+
  release-x86_64-linux-binaries:
+
    runs-on: ubuntu-20.04
+
    steps:
+
      - name: Checkout source code
+
        uses: actions/checkout@v3
+
      - name: Configure build cache
+
        uses: actions/cache@v3
+
        with:
+
          path: |
+
            ~/.cargo/registry
+
            ~/.cargo/git
+
            target
+
            !target/debian
+
          key: cargo-x86_64-linux-${{ hashFiles('**/Cargo.lock') }}
+
      - name: Build the binaries
+
        uses: addnab/docker-run-action@v3
+
        with:
+
            image: registry.gitlab.com/rust_musl_docker/image:stable-latest
+
            options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
+
            run: |
+
              rustup target add x86_64-unknown-linux-musl
+
              cd radicle-cli
+
              cargo build --release --target=x86_64-unknown-linux-musl
+
              chmod --recursive go+r /root/.cargo/registry
+
      - name: Build deb package
+
        uses: addnab/docker-run-action@v3
+
        with:
+
            image: registry.gitlab.com/rust_musl_docker/image:stable-latest
+
            options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
+
            run: |
+
              cargo install cargo-deb
+
              cargo deb --target x86_64-unknown-linux-musl --no-build --package radicle-cli
+
              chmod --recursive go+r /root/.cargo/registry
+
      - shell: bash
+
        run: |
+
          staging="radicle-cli-x86_64-unknown-linux-musl"
+
          mkdir -p "$staging"
+
          cp target/x86_64-unknown-linux-musl/release/rad "$staging"/
+
          tar czf "$staging.tar.gz" "$staging"
+
      - uses: softprops/action-gh-release@v1
+
        with:
+
          fail_on_unmatched_files: true
+
          files: |
+
            radicle-cli-x86_64-unknown-linux-musl.tar.gz
+
            target/x86_64-unknown-linux-musl/debian/*.deb
+

+

+
  release-aarch64-linux-binaries:
+
    runs-on: ubuntu-20.04
+
    steps:
+
      - name: Checkout source code
+
        uses: actions/checkout@v3
+
      - name: Configure build cache
+
        uses: actions/cache@v3
+
        with:
+
          path: |
+
            ~/.cargo/registry
+
            ~/.cargo/git
+
            target
+
            !target/debian
+
          key: cargo-aarch64-linux-${{ hashFiles('**/Cargo.lock') }}
+
      - name: Build the binaries
+
        uses: addnab/docker-run-action@v3
+
        with:
+
            image: messense/rust-musl-cross:aarch64-musl
+
            options: -v ${{ github.workspace }}:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
+
            run: |
+
              rustup target add aarch64-unknown-linux-musl
+
              cd radicle-cli
+
              cargo build --release
+
      - shell: bash
+
        run: |
+
          staging="radicle-cli-aarch64-unknown-linux-musl"
+
          mkdir -p "$staging"
+
          cp target/aarch64-unknown-linux-musl/release/rad "$staging"/
+
          tar czf "$staging.tar.gz" "$staging"
+
      - uses: softprops/action-gh-release@v1
+
        with:
+
          fail_on_unmatched_files: true
+
          files: radicle-cli-aarch64-unknown-linux-musl.tar.gz
+

+
  release-macos-binaries:
+
    runs-on: macos-11
+
    strategy:
+
      matrix:
+
        target:
+
          - x86_64-apple-darwin
+
          - aarch64-apple-darwin
+
    steps:
+
      - run: brew install asciidoctor
+
      - uses: actions/checkout@v3
+
      - name: Configure build cache
+
        uses: actions/cache@v3
+
        with:
+
          path: |
+
            ~/.cargo/registry
+
            ~/.cargo/git
+
            target
+
            !target/debian
+
          key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
+
      - uses: actions-rs/toolchain@v1
+
        with:
+
          profile: minimal
+
          target: ${{ matrix.target }}
+
      - name: Build the release binaries
+
        run: |
+
          cd radicle-cli
+
          env LIBUSB_STATIC=1 cargo build --release --target ${{ matrix.target }}
+
      - name: Build the release archive
+
        shell: bash
+
        run: |
+
          staging="radicle-cli-${{ matrix.target }}"
+
          mkdir -p "$staging"
+
          cp target/${{ matrix.target }}/release/rad "$staging"/
+
          tar czf "$staging.tar.gz" "$staging"
+
      - uses: softprops/action-gh-release@v1
+
        with:
+
          fail_on_unmatched_files: true
+
          files: radicle-cli-${{ matrix.target }}.tar.gz
added .github/workflows/release-httpd.yml
@@ -0,0 +1,85 @@
+
name: Release / httpd
+

+
on:
+
  push:
+
    branches: [master]
+

+
jobs:
+
  release-gcloud-x86_64-linux-binaries:
+
    permissions:
+
      contents: 'read'
+
      id-token: 'write'
+
    runs-on: ubuntu-20.04
+
    steps:
+
      - name: Checkout source code
+
        uses: actions/checkout@v3
+
      - name: Configure build cache
+
        uses: actions/cache@v3
+
        with:
+
          path: |
+
            ~/.cargo/registry
+
            ~/.cargo/git
+
            target
+
          key: cargo-x86_64-linux-${{ hashFiles('**/Cargo.lock') }}
+
      - name: Build the binaries
+
        uses: addnab/docker-run-action@v3
+
        with:
+
          image: registry.gitlab.com/rust_musl_docker/image:stable-latest
+
          options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
+
          run: |
+
            rustup target add x86_64-unknown-linux-musl
+
            cd radicle-httpd
+
            cargo build --release --target=x86_64-unknown-linux-musl
+
            chmod --recursive go+r /root/.cargo/registry
+
      - id: 'auth'
+
        uses: 'google-github-actions/auth@v1'
+
        with:
+
          workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
+
          service_account: 'github-actions@radicle-services.iam.gserviceaccount.com'
+
      - name: 'Set up Cloud SDK'
+
        uses: 'google-github-actions/setup-gcloud@v1'
+
      - id: 'upload-file'
+
        uses: 'google-github-actions/upload-cloud-storage@v1'
+
        with:
+
          path: target/x86_64-unknown-linux-musl/release/radicle-httpd
+
          destination: heartwood-artifacts/${{ github.sha }}/
+

+
  release-gcloud-macos-binaries:
+
    permissions:
+
      contents: 'read'
+
      id-token: 'write'
+
    runs-on: macos-11
+
    strategy:
+
      matrix:
+
        target:
+
          - aarch64-apple-darwin
+
    steps:
+
      - uses: actions/checkout@v3
+
      - name: Configure build cache
+
        uses: actions/cache@v3
+
        with:
+
          path: |
+
            ~/.cargo/registry
+
            ~/.cargo/git
+
            target
+
          key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
+
      - uses: actions-rs/toolchain@v1
+
        with:
+
          profile: minimal
+
          target: ${{ matrix.target }}
+
      - name: Build the release binaries
+
        run: |
+
          cd radicle-httpd
+
          cargo build --release --target ${{ matrix.target }}
+
      - id: 'auth'
+
        uses: 'google-github-actions/auth@v1'
+
        with:
+
          workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
+
          service_account: 'github-actions@radicle-services.iam.gserviceaccount.com'
+
      - name: 'Set up Cloud SDK'
+
        uses: 'google-github-actions/setup-gcloud@v1'
+
      - id: 'upload-file'
+
        uses: 'google-github-actions/upload-cloud-storage@v1'
+
        with:
+
          path: target/${{ matrix.target }}/release/radicle-httpd
+
          destination: heartwood-artifacts/${{ github.sha }}/${{ matrix.target }}/
deleted .github/workflows/release.yml
@@ -1,126 +0,0 @@
-
name: Release
-
on:
-
  push:
-
    tags:
-
      - "[0-9]+.[0-9]+.[0-9]+"
-

-
jobs:
-
  release-x86_64-linux-binaries:
-
    runs-on: ubuntu-20.04
-
    steps:
-
      - name: Checkout source code
-
        uses: actions/checkout@v3
-
      - name: Configure build cache
-
        uses: actions/cache@v3
-
        with:
-
          path: |
-
            ~/.cargo/registry
-
            ~/.cargo/git
-
            target
-
            !target/debian
-
          key: cargo-x86_64-linux-${{ hashFiles('**/Cargo.lock') }}
-
      - name: Build the binaries
-
        uses: addnab/docker-run-action@v3
-
        with:
-
            image: registry.gitlab.com/rust_musl_docker/image:stable-latest
-
            options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
-
            run: |
-
              rustup target add x86_64-unknown-linux-musl
-
              cd radicle-cli
-
              cargo build --release --target=x86_64-unknown-linux-musl
-
              chmod --recursive go+r /root/.cargo/registry
-
      - name: Build deb package
-
        uses: addnab/docker-run-action@v3
-
        with:
-
            image: registry.gitlab.com/rust_musl_docker/image:stable-latest
-
            options: -v ${{ github.workspace }}:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
-
            run: |
-
              cargo install cargo-deb
-
              cargo deb --target x86_64-unknown-linux-musl --no-build --package radicle-cli
-
              chmod --recursive go+r /root/.cargo/registry
-
      - shell: bash
-
        run: |
-
          staging="radicle-cli-x86_64-unknown-linux-musl"
-
          mkdir -p "$staging"
-
          cp target/x86_64-unknown-linux-musl/release/rad "$staging"/
-
          tar czf "$staging.tar.gz" "$staging"
-
      - uses: softprops/action-gh-release@v1
-
        with:
-
          fail_on_unmatched_files: true
-
          files: |
-
            radicle-cli-x86_64-unknown-linux-musl.tar.gz
-
            target/x86_64-unknown-linux-musl/debian/*.deb
-

-

-
  release-aarch64-linux-binaries:
-
    runs-on: ubuntu-20.04
-
    steps:
-
      - name: Checkout source code
-
        uses: actions/checkout@v3
-
      - name: Configure build cache
-
        uses: actions/cache@v3
-
        with:
-
          path: |
-
            ~/.cargo/registry
-
            ~/.cargo/git
-
            target
-
            !target/debian
-
          key: cargo-aarch64-linux-${{ hashFiles('**/Cargo.lock') }}
-
      - name: Build the binaries
-
        uses: addnab/docker-run-action@v3
-
        with:
-
            image: messense/rust-musl-cross:aarch64-musl
-
            options: -v ${{ github.workspace }}:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
-
            run: |
-
              rustup target add aarch64-unknown-linux-musl
-
              cd radicle-cli
-
              cargo build --release
-
      - shell: bash
-
        run: |
-
          staging="radicle-cli-aarch64-unknown-linux-musl"
-
          mkdir -p "$staging"
-
          cp target/aarch64-unknown-linux-musl/release/rad "$staging"/
-
          tar czf "$staging.tar.gz" "$staging"
-
      - uses: softprops/action-gh-release@v1
-
        with:
-
          fail_on_unmatched_files: true
-
          files: radicle-cli-aarch64-unknown-linux-musl.tar.gz
-

-
  release-macos-binaries:
-
    runs-on: macos-11
-
    strategy:
-
      matrix:
-
        target:
-
          - x86_64-apple-darwin
-
          - aarch64-apple-darwin
-
    steps:
-
      - run: brew install asciidoctor
-
      - uses: actions/checkout@v3
-
      - name: Configure build cache
-
        uses: actions/cache@v3
-
        with:
-
          path: |
-
            ~/.cargo/registry
-
            ~/.cargo/git
-
            target
-
            !target/debian
-
          key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
-
      - uses: actions-rs/toolchain@v1
-
        with:
-
          profile: minimal
-
          target: ${{ matrix.target }}
-
      - name: Build the release binaries
-
        run: |
-
          cd radicle-cli
-
          env LIBUSB_STATIC=1 cargo build --release --target ${{ matrix.target }}
-
      - name: Build the release archive
-
        shell: bash
-
        run: |
-
          staging="radicle-cli-${{ matrix.target }}"
-
          mkdir -p "$staging"
-
          cp target/${{ matrix.target }}/release/rad "$staging"/
-
          tar czf "$staging.tar.gz" "$staging"
-
      - uses: softprops/action-gh-release@v1
-
        with:
-
          fail_on_unmatched_files: true
-
          files: radicle-cli-${{ matrix.target }}.tar.gz