Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/actions/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,5 @@
This directory gathers useful actions for Github pipelines.

## `restore-cache`
This action restores and saves cache dedicated for Rust builds
(in particular we keep Cargo files, target directories and make use of sccache).

### Usage
Sample usage:
```yaml
steps:
- uses: Cardinal-Cryptography/github-actions/restore-cache@cache-v1

- run: cargo build

- uses: Cardinal-Cryptography/github-actions/post-cache@v1
```

For building packages excluded from main workspace, you can add corresponding input parameter:
```yaml
steps:
- uses: Cardinal-Cryptography/github-actions/restore-cache@cache-v1
with:
cargo-targets: |
excluded_package_1/target/
aux_tool/excluded_package_2/target/
```

### Notes

**Note:** Currently we only support runners using `ubuntu:latest` image.

**Note:** Requires calling `post-cache` action to stop sccache server.

**Note:** There is a problem with using `cargo clippy` with `sccache` - check: https://github.com/mozilla/sccache/issues/966.
Effectively, you have to override environment variables like this:
```shell
export RUSTC_WRAPPER=""
export RUSTC_WORKSPACE_WRAPPER=sccache
cargo clippy
```

---

## `post-cache`
Stops sccache server. Use together with `restore-cache`.

---

## `run-e2e-test`
Expand Down
1 change: 1 addition & 0 deletions .github/actions/cleanup-workspace/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Clean runner workspace
description: Removes all the files from the runner working directory

Expand Down
16 changes: 9 additions & 7 deletions .github/actions/destroy-feature-environment/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Destroy Feature Environment'
description: 'Action used for feature environment deletion'

Expand All @@ -19,9 +20,6 @@ outputs:
deployment-name:
description: 'Output with a deployment name for working with deployments'
value: ${{ steps.get_branch.outputs.branch_name }}



runs:
using: "composite"
steps:
Expand Down Expand Up @@ -75,15 +73,19 @@ runs:
ARGOCD_URL: argocd.dev.azero.dev
run: |
## Install argocd CLI tool
curl -sSL -o argocd https://github.com/argoproj/argo-cd/releases/download/v2.3.3/argocd-linux-amd64
curl -sSL -o argocd \
https://github.com/argoproj/argo-cd/releases/download/v2.3.3/argocd-linux-amd64
chmod +x argocd && mv argocd /usr/local/bin/

/usr/local/bin/argocd app get fe-root-application --hard-refresh --auth-token ${{ inputs.argo-sync-user-token }} --server ${{ env.ARGOCD_URL }}
/usr/local/bin/argocd app wait fe-root-application --auth-token ${{ inputs.argo-sync-user-token }} --server ${{ env.ARGOCD_URL }}
/usr/local/bin/argocd app get fe-root-application --hard-refresh \
--auth-token ${{ inputs.argo-sync-user-token }} --server ${{ env.ARGOCD_URL }}
/usr/local/bin/argocd app wait fe-root-application --auth-token \
${{ inputs.argo-sync-user-token }} --server ${{ env.ARGOCD_URL }}

- name: Clean S3 storage
shell: bash
env:
BRANCH_NAME: ${{ steps.get_branch.outputs.branch_name }}
run: |
aws s3 rm --recursive s3://fe-alephzero-devnet-eu-central-1-keys-bucket/fe-${{ env.BRANCH_NAME }}
aws s3 rm --recursive \
s3://fe-alephzero-devnet-eu-central-1-keys-bucket/fe-${{ env.BRANCH_NAME }}
4 changes: 3 additions & 1 deletion .github/actions/get-branch/action.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Get branch details
description: Gets branch name and commit SHA

Expand Down Expand Up @@ -25,5 +26,6 @@ runs:
HEAD_REF: ${{ github.head_ref || github.ref }}
run: |
echo "##[set-output name=branch_name;]$(echo ${HEAD_REF#refs/heads/} | tr / -)"
echo "##[set-output name=branch_appname;]$(printf ${HEAD_REF#refs/heads/} | tr / - | tr '[:upper:]' '[:lower:]' | tr -c '[a-z0-9-.]' '-')"
echo "##[set-output name=branch_appname;]$(printf ${HEAD_REF#refs/heads/} \
| tr / - | tr '[:upper:]' '[:lower:]' | tr -c '[a-z0-9-.]' '-')"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
22 changes: 0 additions & 22 deletions .github/actions/post-cache/action.yml

This file was deleted.

105 changes: 0 additions & 105 deletions .github/actions/restore-cache/action.yml

This file was deleted.

13 changes: 10 additions & 3 deletions .github/actions/run-e2e-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Run e2e test'
description: 'Run single e2e test.'

Expand Down Expand Up @@ -58,7 +59,11 @@ runs:

- name: Run consensus party
shell: bash
run: NODE_IMAGE=${{ inputs.node-image }} DOCKER_COMPOSE=${{ inputs.compose-file }} ./.github/scripts/run_consensus.sh -m ${{ inputs.min-validator-count }} -n ${{ inputs.node-count }}
run: |
NODE_IMAGE=${{ inputs.node-image }} \
DOCKER_COMPOSE=${{ inputs.compose-file }} \
./.github/scripts/run_consensus.sh \
-m ${{ inputs.min-validator-count }} -n ${{ inputs.node-count }}

- name: Sleep
shell: bash
Expand Down Expand Up @@ -91,7 +96,7 @@ runs:

RESERVED_SEATS="${{ inputs.reserved-seats }}"
NON_RESERVED_SEATS="${{ inputs.non-reserved-seats }}"

if [[ -n "${RANDOMIZED}" ]]; then
ARGS+=(-r "${RANDOMIZED}")
fi
Expand All @@ -116,4 +121,6 @@ runs:
- name: Run finalization e2e test
if: inputs.follow-up-finalization-check == 'true'
shell: bash
run: ./.github/scripts/run_e2e_test.sh -t finalization::finalization -m "${{ inputs.min-validator-count }}"
run: |
./.github/scripts/run_e2e_test.sh \
-t finalization::finalization -m "${{ inputs.min-validator-count }}"
6 changes: 4 additions & 2 deletions .github/actions/slack-notification/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
name: 'Send Slack notifiction'
description: 'Action used to send Slack notifications about workflow status in channel specified in SLACK_WEBHOOK'

description: |
Action used to send Slack notifications about workflow status in channel specified in
SLACK_WEBHOOK
inputs:
notify-on:
description: "Choose when Slack messages should be sent"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
services:
Node0:
environment:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/build-and-push-cliain.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
name: Build and push cliain docker image

on:
push:
paths:
- 'bin/cliain/**'
- .github/workflows/build-and-push-cliain.yaml
Comment thread
pmikolajczyk41 marked this conversation as resolved.
workflow_dispatch:

jobs:
Expand All @@ -17,12 +19,6 @@ jobs:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.6.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cargo | Build release binary
run: |
cd ./bin/cliain && cargo build --release
Expand All @@ -47,7 +43,9 @@ jobs:
- name: Build and push latest docker image
id: build-image
env:
RELEASE_IMAGE: public.ecr.aws/p6e8q1z1/cliain:${{ steps.get_branch.outputs.branch_name == 'main' && 'latest' || steps.get_branch.outputs.branch_name }}
RELEASE_IMAGE: >
public.ecr.aws/p6e8q1z1/cliain:${{ steps.get_branch.outputs.branch_name == 'main'
&& 'latest' || steps.get_branch.outputs.branch_name }}
uses: docker/build-push-action@v2
with:
context: ./bin/cliain
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
# this workflow builds rustdoc for aleph-node crates
name: build-docs

on:
push:
pull_request:
paths:
- 'aleph-client/**'
- .github/workflows/build-docs.yaml

jobs:
build-aleph-client-docs:
Expand Down
Loading