From 9ca9b61be0e8d3a77946b3933b25bec294b8e7ab Mon Sep 17 00:00:00 2001 From: chevdor Date: Fri, 4 Jun 2021 11:40:32 +0200 Subject: [PATCH 1/3] feat(ci): update runtime build workflow - switch to a tag for the chevdor/srtool-actions - trigger to only tags & ignore folders not involved in the runtime - add weekly build schedule - add timestamp to the artifacts --- .github/workflows/srtool.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/srtool.yml b/.github/workflows/srtool.yml index 8ab8ed3dfc0..b8aee3e9422 100644 --- a/.github/workflows/srtool.yml +++ b/.github/workflows/srtool.yml @@ -1,6 +1,18 @@ name: Srtool build -on: push +on: + push: + tags: + - "*" + + paths-ignore: + - "docker" + - "docs" + - "scripts" + - "test" + + schedule: + - cron: "00 02 * * 1" # 2AM weekly on monday jobs: srtool: @@ -9,10 +21,15 @@ jobs: matrix: chain: ["statemine", "westmint"] steps: + - name: Get Time + id: time + uses: nanzm/get-time-action@v1.1 + with: + format: "YYYY_MM_DD-HH_mm_ss" - uses: actions/checkout@v2 - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@draft + uses: chevdor/srtool-actions@v0.1.0 with: chain: ${{ matrix.chain }} runtime_dir: polkadot-parachains/${{ matrix.chain }}-runtime @@ -23,8 +40,10 @@ jobs: echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" - name: Archive Runtime uses: actions/upload-artifact@v2 + env: + TMSP: "${{ steps.time.outputs.time }}" with: - name: ${{ matrix.chain }}-runtime-${{ github.sha }} + name: ${{ matrix.chain }}-runtime-$TIME-${{ github.sha }} path: | ${{ steps.srtool_build.outputs.wasm }} ${{ matrix.chain }}-srtool-digest.json @@ -50,8 +69,10 @@ jobs: cat ${{ matrix.chain }}-diff.txt - name: Archive Subwasm results uses: actions/upload-artifact@v2 + env: + TMSP: "${{ steps.time.outputs.time }}" with: - name: ${{ matrix.chain }}-runtime-${{ github.sha }} + name: ${{ matrix.chain }}-runtime-$TIME-${{ github.sha }} path: | ${{ matrix.chain }}-info.json ${{ matrix.chain }}-metadata.json From 947c420b237a6328e15608ad27e50f3a10c5c3ba Mon Sep 17 00:00:00 2001 From: chevdor Date: Fri, 4 Jun 2021 14:45:47 +0200 Subject: [PATCH 2/3] Remove depdency on external github action --- .github/workflows/srtool.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/srtool.yml b/.github/workflows/srtool.yml index b8aee3e9422..23b8f135b2f 100644 --- a/.github/workflows/srtool.yml +++ b/.github/workflows/srtool.yml @@ -21,11 +21,8 @@ jobs: matrix: chain: ["statemine", "westmint"] steps: - - name: Get Time - id: time - uses: nanzm/get-time-action@v1.1 - with: - format: "YYYY_MM_DD-HH_mm_ss" + - name: Get Timestamp + run: echo "TMSP=$(date '+%Y%m%d_%H%M%S')" >> $GITHUB_ENV - uses: actions/checkout@v2 - name: Srtool build id: srtool_build @@ -43,7 +40,7 @@ jobs: env: TMSP: "${{ steps.time.outputs.time }}" with: - name: ${{ matrix.chain }}-runtime-$TIME-${{ github.sha }} + name: ${{ matrix.chain }}-runtime-${{ env.TMSP }}-${{ github.sha }} path: | ${{ steps.srtool_build.outputs.wasm }} ${{ matrix.chain }}-srtool-digest.json @@ -72,7 +69,7 @@ jobs: env: TMSP: "${{ steps.time.outputs.time }}" with: - name: ${{ matrix.chain }}-runtime-$TIME-${{ github.sha }} + name: ${{ matrix.chain }}-runtime-${{ env.TMSP }}-${{ github.sha }} path: | ${{ matrix.chain }}-info.json ${{ matrix.chain }}-metadata.json From e65c89c5ed20b03d518f14605d9d217bbea88f0e Mon Sep 17 00:00:00 2001 From: chevdor Date: Fri, 4 Jun 2021 21:58:05 +0200 Subject: [PATCH 3/3] Fix TMSP --- .github/workflows/srtool.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/srtool.yml b/.github/workflows/srtool.yml index 23b8f135b2f..4087be5ee90 100644 --- a/.github/workflows/srtool.yml +++ b/.github/workflows/srtool.yml @@ -37,8 +37,6 @@ jobs: echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" - name: Archive Runtime uses: actions/upload-artifact@v2 - env: - TMSP: "${{ steps.time.outputs.time }}" with: name: ${{ matrix.chain }}-runtime-${{ env.TMSP }}-${{ github.sha }} path: | @@ -66,8 +64,6 @@ jobs: cat ${{ matrix.chain }}-diff.txt - name: Archive Subwasm results uses: actions/upload-artifact@v2 - env: - TMSP: "${{ steps.time.outputs.time }}" with: name: ${{ matrix.chain }}-runtime-${{ env.TMSP }}-${{ github.sha }} path: |