Skip to content

Commit

Permalink
Add production cargo profiles (#451)
Browse files Browse the repository at this point in the history
* add different cargo profiles

* try to update rustc toolchain

* update dockerignore

* run ts-test for built production image

* add --locked

* cargo update

* rename the GA ymls to be more consistent

* adjust push tags
  • Loading branch information
Kailai-Wang authored Apr 19, 2022
1 parent 35727b9 commit fffede0
Show file tree
Hide file tree
Showing 20 changed files with 146 additions and 81 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.dockerignore
.git/
.github/
.githooks/
**/target
**/ts-tests
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ These checks should be performed after forking to a release branch, that is, on
These are the general checks for the releasing process.

- [ ] Verify a **`tag`** has been correctly acquired on `release-{{ env.VERSION }}` branch.
- [ ] Verify **`release-draft`** has been created by [create_release_draft.yml](https://github.com/litentry/litentry-parachain/blob/dev/.github/workflows/create_release_draft.yml) and is ready to publish.
- [ ] Verify **`release-draft`** has been created by [create-release-draft.yml](https://github.com/litentry/litentry-parachain/blob/dev/.github/workflows/create-release-draft.yml) and is ready to publish.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,56 @@ jobs:
${{ env.GENESIS_RELEASE }}-genesis-state
${{ env.GENESIS_RELEASE }}-genesis-wasm
## test again the built docker image ##
run-ts-tests:
runs-on: ubuntu-latest
needs: build-docker
strategy:
matrix:
chain:
- litmus
- litentry
steps:
- name: Checkout codes
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download and tag docker image
run: |
docker pull litentry/litentry-parachain:${{ env.RELEASE_TAG }}
docker tag litentry/litentry-parachain:${{ env.RELEASE_TAG }} litentry/litentry-parachain:latest
- name: Run ts tests for ${{ matrix.chain }}
timeout-minutes: 20
run: |
make test-ts-docker-${{ matrix.chain }}
- name: Archive logs if test fails
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: ${{ matrix.chain }}-ts-tests-artifacts
path: /tmp/parachain_dev/
retention-days: 3

- name: Clean up for ${{ matrix.chain }}
if: ${{ always() }}
run: |
make clean-docker-${{ matrix.chain }}
## create the release draft ##
create-release-draft:
runs-on: ubuntu-latest
# see https://github.com/actions/runner/issues/491
# seems to be the only way to achieve this
needs:
- build-wasm
- build-docker
- run-ts-tests
if: |
!failure() && !cancelled() &&
(success('build-wasm') || success('build-docker'))
(success('build-wasm') || success('run-ts-tests'))
steps:
- name: Checkout codes on ${{ env.RELEASE_TAG }}
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-[0-9]+'

jobs:
create-release-issue:
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit fffede0

Please sign in to comment.