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

clean up release pipeline #541

Merged
merged 1 commit into from
Jan 23, 2022
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
128 changes: 0 additions & 128 deletions .github/workflows/build-artifacts.yml

This file was deleted.

8 changes: 1 addition & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,9 @@ jobs:
run: |
rustup show
- uses: actions/checkout@v2
- name: Run Test (with coverage)
- name: Run Test
run: |
SKIP_WASM_BUILD=1 cargo test --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: false

linters:
name: Linters
Expand Down
104 changes: 95 additions & 9 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,99 @@ on:
branches:
- releases
jobs:
update_release_draft:
runs-on: ubuntu-latest
build-and-publish:
runs-on:
- self-hosted
- linux
- x64
- sre
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.COMPOSABLE_GITHUB_TOKEN }}
- name: Clean up
continue-on-error: true
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
docker system prune --force --all --volumes

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

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install srtool
run: |
cargo install --git https://github.com/chevdor/srtool-cli
cargo install --locked --git https://github.com/chevdor/subwasm --tag v0.16.1

- name: Runtime wasm builds
id: runtime_release
run: |
.maintain/runtime_release.sh

- uses: release-drafter/release-drafter@v5
id: release_drafter

- name: Set Permission
continue-on-error: true
run: |
sudo su runner

- uses: actions/setup-node@v2
with:
node-version: '16'

- name: Add runtime metadata to release body
run: |
cd scripts/github && npm install
printf "\n%s" "${{ steps.release_drafter.outputs.body }}" >> $GITHUB_WORKSPACE/release.md
npm run update-release-body -- --id=${{ steps.release_drafter.outputs.id }} --repo=composableFi/composable --body="$GITHUB_WORKSPACE/release.md"
cd $GITHUB_WORKSPACE

- name: Upload Dali wasm
id: upload-dali-wasm
if: env.dali_wasm == 1
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./runtime/dali/target/srtool/release/wbuild/dali-runtime/dali_runtime.compact.wasm
asset_name: dali_runtime.compact.wasm
asset_content_type: application/octet-stream

- name: Upload Picasso wasm
id: upload-picasso-wasm
if: env.picasso_wasm == 1
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./runtime/picasso/target/srtool/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm
asset_name: picasso_runtime.compact.wasm
asset_content_type: application/octet-stream

- name: Upload Composable wasm
id: upload-composable-wasm
if: env.composable_wasm == 1
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./runtime/composable/target/srtool/release/wbuild/composable-runtime/composable_runtime.compact.wasm
asset_name: composable_runtime.compact.wasm
asset_content_type: application/octet-stream

- name: 🔨 Build Composable Binary
run: |
.maintain/client_release.sh

- name: Upload Composable Node Binaries
id: upload-composable-binary
if: env.client_release == 1
uses: actions/upload-release-asset@v1

with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./target/release/composable
asset_name: composable
asset_content_type: application/octet-stream
6 changes: 2 additions & 4 deletions .maintain/check_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ simnode_check() {
VERSIONS_FILE="$1"
if has_runtime_changes "${BASE_BRANCH}" "${GITHUB_REF_NAME}" "$2" && check_runtime "$VERSIONS_FILE" "$2"
then
echo "Wasm sources have changed"
echo "Wasm sources have changed for $3"
echo "RUNTIME_CHECK=1" >> $GITHUB_ENV
else
echo "RUNTIME_CHECK=0" >> $GITHUB_ENV
fi
}

for i in "${VERSIONS_FILES[@]}"; do
while IFS=',' read -r output chain folder; do
boldprint "Check if the wasm sources changed for $chain"
simnode_check $output $folder
simnode_check $output $folder $chain
done <<< "$i"
done

Expand Down
21 changes: 0 additions & 21 deletions docker-compose.yml

This file was deleted.