Skip to content

Commit

Permalink
Merge branch 'feature/berlin' into london-tests-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Feb 15, 2024
2 parents 2af2ab5 + 794e4cc commit 09d4def
Show file tree
Hide file tree
Showing 27 changed files with 1,628 additions and 903 deletions.
68 changes: 0 additions & 68 deletions .github/workflows/ansible/update_bladenet.yaml

This file was deleted.

17 changes: 4 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,51 @@
---
name: Build
name: Build Blade
on: # yamllint disable-line rule:truthy
workflow_dispatch:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
workflow_output:
description: "Build output"
description: "Build Blade output"
value: ${{ jobs.go_build.outputs.build_output_failure }}

jobs:
go_build:
name: Blade
name: Build
runs-on: ubuntu-latest
outputs:
build_output_failure: ${{ steps.blade_build_failure.outputs.build_output }}
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Setup Go environment
uses: actions/setup-go@v5.0.0
with:
go-version: 1.20.x

- name: Build Blade
run: go build -o blade -tags netgo -ldflags="-s -w -X \"github.com/Ethernal-Tech/blade/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/Ethernal-Tech/blade/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf blade.tar.gz blade
run: go build -o blade -tags netgo -ldflags="-s -w -X \"github.com/${GITHUB_REPOSITORY}/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/${GITHUB_REPOSITORY}/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf blade.tar.gz blade
env:
GOARC: amd64
GOOS: linux

- name: Build Blade Failed
if: failure()
id: blade_build_failure
run: echo "build_output=false" >> $GITHUB_OUTPUT

- name: "Upload Artifact"
uses: actions/upload-artifact@v4.3.0
with:
name: blade
path: blade.tar.gz
retention-days: 3

go_build_reproducibility:
name: Verify Build Reproducibility
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Setup Go environment
uses: actions/setup-go@v5.0.0
with:
go-version: 1.20.x

- name: Reproduce builds
continue-on-error: true
run: |
Expand Down
145 changes: 136 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,146 @@
---
name: CI
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
branches:
- main
- develop
pull_request:
workflow_dispatch: {}
workflow_dispatch:
inputs:
build-blade:
description: Build Blade
type: boolean
default: true
lint:
description: Lint
type: boolean
default: true
unit-test:
description: Unit Tests
type: boolean
default: true
e2e-polybft-test:
description: E2E PolyBFT Tests
type: boolean
default: true
e2e-legacy-test:
description: E2E Legacy Tests
type: boolean
default: true
property-polybft-test:
description: Property PolyBFT Tests
type: boolean
default: true
fuzz-test:
description: Fuzz Tests
type: boolean
default: true
workflow_call:
inputs:
build-blade:
description: Build Blade
type: boolean
lint:
description: Lint
type: boolean
required: true
unit-test:
description: Unit Tests
type: boolean
required: true
e2e-polybft-test:
description: E2E PolyBFT Tests
type: boolean
required: true
e2e-legacy-test:
description: E2E Legacy Tests
type: boolean
required: true
property-polybft-test:
description: Property PolyBFT Tests
type: boolean
required: true
fuzz-test:
description: Fuzz Tests
type: boolean
required: true
outputs:
build-blade:
description: Build Blade output
value: ${{ jobs.build-blade.outputs.workflow_output }}
lint:
description: Lint output
value: ${{ jobs.lint.outputs.workflow_output }}
unit-test:
description: Unit Tests output
value: ${{ jobs.unit-test.outputs.workflow_output }}
e2e-polybft-test:
description: E2E PolyBFT Tests output
value: ${{ jobs.e2e-polybft-test.outputs.workflow_output }}
e2e-legacy-test:
description: E2E Legacy Tests output
value: ${{ jobs.e2e-legacy-test.outputs.workflow_output }}
property-polybft-test:
description: Property PolyBFT Tests output
value: ${{ jobs.property-polybft-test.outputs.workflow_output }}
fuzz-test:
description: Fuzz Tests output
value: ${{ jobs.fuzz-test.outputs.workflow_output }}

jobs:
build:
name: Build
build-blade:
name: Build Blade
uses: ./.github/workflows/build.yml

test:
name: Test
uses: ./.github/workflows/test.yml
needs: build
if: |
inputs.build-blade ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
lint:
name: Lint
uses: ./.github/workflows/lint.yml
needs: build-blade
if: |
inputs.lint ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
unit-test:
name: Unit Tests
uses: ./.github/workflows/unit-test.yml
needs: build-blade
if: |
inputs.unit-test ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
e2e-polybft-test:
name: E2E PolyBFT Tests
uses: ./.github/workflows/e2e-polybft-test.yml
needs: build-blade
if: |
inputs.e2e-polybft-test ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
e2e-legacy-test:
name: E2E Legacy Tests
uses: ./.github/workflows/e2e-legacy-test.yml
needs: build-blade
if: |
inputs.e2e-legacy-test ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
property-polybft-test:
name: Property PolyBFT Tests
uses: ./.github/workflows/property-polybft-test.yml
needs: build-blade
if: |
inputs.property-polybft-test ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
fuzz-test:
name: Fuzz Tests
uses: ./.github/workflows/fuzz-test.yml
needs: build-blade
if: |
inputs.fuzz-test ||
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'))
6 changes: 3 additions & 3 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "CLA Assistant"
name: CLA Assistant
on: # yamllint disable-line rule:truthy
issue_comment:
types:
Expand All @@ -10,7 +10,7 @@ on: # yamllint disable-line rule:truthy
- synchronize

jobs:
CLAssistant:
cla-assistant:
runs-on: ubuntu-latest
steps:
- name: "Check CLA"
Expand All @@ -22,6 +22,6 @@ jobs:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: "cla.json"
path-to-document: "https://github.com/Ethernal-Tech/blade/blob/develop/CLA.md"
path-to-document: "https://github.com/${GITHUB_REPOSITORY}/blob/develop/CLA.md"
branch: "cla-signatures"
allowlist: dependabot[bot],dependabot-preview[bot]
Loading

0 comments on commit 09d4def

Please sign in to comment.