-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update srtool.yml * Update srtool.yml * Update srtool.yml * add LP-DOT/sDOT
- Loading branch information
Showing
4 changed files
with
40 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,53 +8,20 @@ on: | |
- "v*" | ||
|
||
jobs: | ||
start-runner: | ||
name: start self-hosted EC2 runner | ||
runs-on: ubuntu-latest | ||
outputs: | ||
label: ${{ steps.start-ec2-runner.outputs.label }} | ||
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Start EC2 runner | ||
id: start-ec2-runner | ||
uses: machulav/ec2-github-runner@v2 | ||
with: | ||
mode: start | ||
github-token: ${{ secrets.PAT_RUNNER }} | ||
ec2-image-id: ${{ secrets.EC2_IMAGE_ID }} | ||
ec2-instance-type: ${{ secrets.EC2_INSTANCE_TYPE }} | ||
subnet-id: ${{ secrets.SUBNET_ID }} | ||
security-group-id: ${{ secrets.SECURITY_GROUP_ID }} | ||
aws-resource-tags: > | ||
[ | ||
{"Key": "Name", "Value": "${{ github.workflow }}"}, | ||
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"} | ||
] | ||
srtool: | ||
if: github.repository == 'parallel-finance/parallel' | ||
needs: start-runner | ||
runs-on: ${{ needs.start-runner.outputs.label }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
chain: ["heiko", "parallel", "vanilla", "kerria"] | ||
steps: | ||
- name: cleaning up | ||
run: | | ||
echo '${{ secrets.RUNNER_PASSWORD }}' | sudo -S chown -R $USER:$USER $GITHUB_WORKSPACE | ||
echo "HOME=/home/ubuntu" >> ${GITHUB_ENV} | ||
- uses: actions/checkout@v3 | ||
- name: Srtool build | ||
id: srtool_build | ||
run: | | ||
make RUNTIME=${{ matrix.chain }}-runtime wasm | ||
uses: chevdor/[email protected] | ||
with: | ||
chain: ${{ matrix.chain }} | ||
runtime_dir: runtime/${{ matrix.chain }} | ||
- name: Summary | ||
run: | | ||
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json | ||
|
@@ -149,27 +116,3 @@ jobs: | |
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "Parallel ${{ steps.git_tag.outputs.tag }} has just been released! Go check it out: https://github.com/${{ github.repository }}/releases/tag/${{ steps.git_tag.outputs.tag }}" | ||
|
||
stop-runner: | ||
name: stop self-hosted EC2 runner | ||
needs: | ||
- start-runner | ||
- srtool | ||
- postrelease | ||
runs-on: ubuntu-latest | ||
if: ${{ always() }} | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Stop EC2 runner | ||
uses: machulav/ec2-github-runner@v2 | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.PAT_RUNNER }} | ||
label: ${{ needs.start-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters