Skip to content

Commit

Permalink
check_runtime workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Jan 17, 2022
1 parent e2ac78f commit dc21e6d
Show file tree
Hide file tree
Showing 43 changed files with 725 additions and 409 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: "Build Artifacts"

on:
workflow_dispatch:
push:
tags:
- '*'

env:
DOCKER_USER_OPTION: '$UID:$GID'
SCCACHE_GCS_BUCKET: 'composable-build-artefacts'
RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache"
SCCACHE_GCS_RW_MODE: "READ_WRITE"

jobs:
build-and-publish:
runs-on:
- self-hosted
- linux
- x64
- sre
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set env
run: |
echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV
make version
- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: 🔨 Build and Upload Composable Binary
working-directory: "./.maintain/"
id: runtime_release
run: |
./client_release.sh
- name: Build wasm with srtool
working-directory: "./.maintain/"
id: runtime_release
run: |
./runtime_release.sh
- name: Upload Compressed wasm # TODO only upload wasm that has changed
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }}
file: ./runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.compressed.wasm
asset_name: picasso_runtime.compact.compressed.wasm
tag: ${{ github.ref }}
overwrite: true

- name: Upload Binary on Release # TODO Only upload binary if client files have changed
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }}
file: target/release/composable
asset_name: composable
tag: ${{ github.ref }}
overwrite: true

- name: Update Release Note
run: |
sed -i '1i # Code ' release.md
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: release.md
token: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }}


dali-chacha-client-release:
needs: [build-and-publish]
runs-on:
- self-hosted
- linux
- X64
- ansible-runner

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set env
run: |
echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV
- name: Run ansible playbook
working-directory: "./.maintain/playbooks"
run: |
ansible-playbook -l _environment_testnet client-upgrade.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3'
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- main
- develop
- release/*
- releases
push:
branches:
- main
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/client-release.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Docker Release"

on:
workflow_dispatch:
push:
tags:
- '*'

env:
DOCKER_USER_OPTION: '$UID:$GID'
SCCACHE_GCS_BUCKET: 'composable-build-artefacts'
RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache"
SCCACHE_GCS_RW_MODE: "READ_WRITE"

jobs:
build-and-publish:
runs-on:
- self-hosted
- linux
- x64
- sre
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set env
run: |
echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV
make version
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build Docker image
run: make containerize-release

- name: Docker push
run: make push-release

1 change: 1 addition & 0 deletions .github/workflows/picashot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Check Runtime
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
- release/*
- releases
jobs:
update_release_draft:
runs-on: ubuntu-latest
Expand Down
42 changes: 38 additions & 4 deletions .github/workflows/runtime-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,55 @@ name: Check Runtime
on:
push:
branches:
- release-*
- releases
- main
pull_request:
branches:
- release-*
- releases
- main
jobs:
check-runtime:
runs-on: ubuntu-latest
runs-on:
- self-hosted
- linux
- x64
- sre
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Check for runtime changes
working-directory: "./.maintain/"
id: check_runtime
run: |
sh check_runtime.sh
./check_runtime.sh
- name: Echo output
run: echo ${{ env.RUNTIME_CHECK }}

- name: Run Simnode
if: "$${{ env.RUNTIME_CHECK }} == 1"
working-directory: "./.maintain/"
id: run_simnode
run: |
./run_simnode.sh
benchmark:
name: Benchmark
runs-on:
- self-hosted
- linux
- x64
- bmark
steps:
- uses: actions/checkout@v2
- name: Benchmark Test
if: "$${{ env.RUNTIME_CHECK }} == 1"
working-directory: "./.maintain/"
id: run_benchmarks
run: |
./run_benchmarks.sh
Loading

0 comments on commit dc21e6d

Please sign in to comment.