Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

❇️ org arc-runner patch 1 #1240

Merged
merged 11 commits into from
Jul 31, 2023
68 changes: 18 additions & 50 deletions .github/workflows/metadata_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,29 @@ on:
default: manta-dev
required: true
env:
AWS_REGION: us-east-1
AWS_INSTANCE_TYPE: c5.2xlarge
AWS_INSTANCE_ROOT_VOLUME_SIZE: 32
AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*
AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]'
CHAIN: ${{github.event.inputs.chain}}
ENDPOINT: ${{github.event.inputs.endpoint}}
DEBIAN_FRONTEND: noninteractive
jobs:
start-checks:
timeout-minutes: 120
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
container:
image: ubuntu:20.04
strategy:
matrix:
node-version: [16.x]
outputs:
runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }}
aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }}
aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }}
steps:
- id: start-self-hosted-runner
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: start
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }}
aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }}
aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }}
aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }}
- uses: actions/checkout@v2
- uses: borales/actions-yarn@v3.0.0
- name: install sccache
env:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
apt update
apt install -y curl
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
Expand Down Expand Up @@ -77,18 +62,18 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
apt update
apt install -y pkg-config libssl-dev protobuf-compiler curl
protoc --version
sudo apt remove -y '^dotnet-.*'
sudo apt remove -y '^mongodb-.*'
sudo apt remove -y '^mysql-.*'
sudo apt remove -y '^postgresql-*'
sudo apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
sudo apt autoremove -y
sudo apt clean
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
apt remove -y '^dotnet-.*'
apt remove -y '^mongodb-.*'
apt remove -y '^mysql-.*'
apt remove -y '^postgresql-*'
apt remove -y google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
apt autoremove -y
apt clean
rm -rf /usr/local/lib/android
rm -rf /usr/share/dotnet
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install nightly-2023-03-03
Expand Down Expand Up @@ -177,20 +162,3 @@ jobs:
name: ${{ env.CHAIN }}
path: |
output.txt
stop-checks:
needs: start-checks
runs-on: ubuntu-20.04
if: ${{ always() }}
steps:
- continue-on-error: true
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: stop
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ needs.start-checks.outputs.aws-region }}
runner-label: ${{ needs.start-checks.outputs.runner-label }}
aws-instance-id: ${{ needs.start-checks.outputs.aws-instance-id }}
- name: discard stopper success/failure
run: true
81 changes: 23 additions & 58 deletions .github/workflows/publish_draft_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
AWS_INSTANCE_SSH_PUBLIC_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb24HEQ++aNFWaqVyMtIs6GotUB8R+q61XOoI2z6uMj
AWS_REGION: us-east-1
AWS_SUBNET_ID: subnet-08c26caf0a52b7c19
AWS_SECURITY_GROUP_ID: sg-0315bffea9042ac9b
AWS_INSTANCE_TYPE: c5.2xlarge
AWS_INSTANCE_ROOT_VOLUME_SIZE: 32
AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*
AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]'
DEBIAN_FRONTEND: noninteractive
jobs:
get-rust-versions:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
container:
image: paritytech/ci-linux:production
outputs:
Expand All @@ -35,9 +29,12 @@ jobs:
build-runtimes:
timeout-minutes: 180
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
env:
CARGO_TERM_COLOR: always
container:
image: ubuntu:20.04
strategy:
matrix:
runtime:
Expand Down Expand Up @@ -80,8 +77,10 @@ jobs:
build-node-current:
timeout-minutes: 180
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: start-node-builder-current
runs-on: ${{ needs.start-node-builder-current.outputs.runner-label }}
runs-on: runtime
shell: bash
container:
image: ubuntu:20.04
env:
CARGO_TERM_COLOR: always
steps:
Expand All @@ -91,6 +90,8 @@ jobs:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
apt update
apt install -y curl
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
Expand Down Expand Up @@ -119,8 +120,8 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
apt update
apt install -y pkg-config libssl-dev protobuf-compiler curl
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
Expand Down Expand Up @@ -161,7 +162,8 @@ jobs:
path: .github/resources/config-for-runtime-upgrade-test.json
# THE FOLLOWING HAPPENS ONLY WHEN TAGGED WITH A vX.Y.Z TAG
create-draft-release:
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
needs: [build-runtimes]
outputs:
release_url: ${{ steps.create-release.outputs.html_url }}
Expand All @@ -178,7 +180,8 @@ jobs:
release_name: ${{ github.ref }}
draft: true
publish-runtimes:
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
needs: create-draft-release
strategy:
matrix:
Expand Down Expand Up @@ -243,7 +246,8 @@ jobs:
asset_name: ${{ matrix.runtime.name }}-srtool-output-v${{ steps.get-runtime-version.outputs.runtime_ver }}.json
asset_content_type: application/json
publish-node:
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
needs: [build-node-current, create-draft-release]
outputs:
download_url: ${{ steps.upload-manta.outputs.browser_download_url }}
Expand All @@ -263,7 +267,8 @@ jobs:
asset_name: manta
asset_content_type: application/octet-stream
brag:
runs-on: ubuntu-20.04
runs-on: runtime
shell: bash
needs: [publish-runtimes, publish-node]
if: startsWith(github.ref, 'refs/tags')
steps:
Expand All @@ -274,43 +279,3 @@ jobs:
uses: Ilshidur/action-discord@0.3.2
with:
args: 'draft runtime release ${{ github.ref }} created at ${{ needs.create-draft-release.outputs.release_url }}'
start-node-builder-current:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-20.04
outputs:
runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }}
aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }}
aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }}
steps:
- id: start-self-hosted-runner
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: start
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-instance-ssh-public-key: ${{ env.AWS_INSTANCE_SSH_PUBLIC_KEY }}
aws-region: ${{ env.AWS_REGION }}
aws-subnet-id: ${{ env.AWS_SUBNET_ID }}
aws-security-group-id: ${{ env.AWS_SECURITY_GROUP_ID }}
aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }}
aws-instance-root-volume-size: 32
aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }}
aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }}
stop-node-builder-current:
if: ${{ always() }}
needs: [start-node-builder-current, build-node-current]
runs-on: ubuntu-20.04
steps:
- continue-on-error: true
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: stop
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ needs.start-node-builder-current.outputs.aws-region }}
runner-label: ${{ needs.start-node-builder-current.outputs.runner-label }}
aws-instance-id: ${{ needs.start-node-builder-current.outputs.aws-instance-id }}
- name: discard stopper success/failure
run: true
50 changes: 9 additions & 41 deletions .github/workflows/run_linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
AWS_REGION: us-east-1
AWS_INSTANCE_TYPE: c5.2xlarge
AWS_INSTANCE_ROOT_VOLUME_SIZE: 32
AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*
AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]'
DEBIAN_FRONTEND: noninteractive
jobs:
start-checks:
timeout-minutes: 120
runs-on: ubuntu-20.04
outputs:
runner-label: ${{ steps.start-self-hosted-runner.outputs.runner-label }}
aws-region: ${{ steps.start-self-hosted-runner.outputs.aws-region }}
aws-instance-id: ${{ steps.start-self-hosted-runner.outputs.aws-instance-id }}
runs-on: runtime
shell: bash
container:
image: ubuntu:20.04
steps:
- id: start-self-hosted-runner
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: start
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
aws-instance-type: ${{ env.AWS_INSTANCE_TYPE }}
aws-instance-root-volume-size: ${{ env.AWS_INSTANCE_ROOT_VOLUME_SIZE }}
aws-image-search-pattern: ${{ env.AWS_IMAGE_SEARCH_PATTERN }}
aws-image-search-owners: ${{ env.AWS_IMAGE_SEARCH_OWNERS }}
- uses: actions/checkout@v2
- name: Run yamllint
uses: actionshub/yamllint@v1.5.0
Expand All @@ -42,6 +25,8 @@ jobs:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
apt update
apt install -y curl
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
Expand Down Expand Up @@ -72,8 +57,8 @@ jobs:
# NOTE: We use nightly Rust only to get nightly fmt & clippy
# TODO: use nightly after https://github.com/clap-rs/clap/issues/4733 fixed.
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
apt update
apt install -y pkg-config libssl-dev protobuf-compiler curl
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
Expand Down Expand Up @@ -103,20 +88,3 @@ jobs:
SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features -- -D warnings
- name: stop sccache server
run: sccache --stop-server || true
stop-checks:
needs: start-checks
runs-on: ubuntu-20.04
if: ${{ always() }}
steps:
- continue-on-error: true
uses: audacious-network/aws-github-runner@v1.0.33
with:
mode: stop
github-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ needs.start-checks.outputs.aws-region }}
runner-label: ${{ needs.start-checks.outputs.runner-label }}
aws-instance-id: ${{ needs.start-checks.outputs.aws-instance-id }}
- name: discard stopper success/failure
run: true
Loading