12
12
required : false
13
13
type : string
14
14
15
-
16
15
jobs :
17
16
build :
18
17
name : Build binary artifacts
25
24
with :
26
25
ref : ${{ inputs.ref }}
27
26
27
+ - name : Get branch name and commit SHA
28
+ id : get_branch
29
+ uses : ./.github/actions/get-branch
30
+
28
31
- name : Install Rust toolchain
29
32
uses : actions-rs/toolchain@v1
30
33
61
64
if-no-files-found : error
62
65
retention-days : 7
63
66
67
+ - name : S3 CI | Configure AWS credentials
68
+ uses : aws-actions/configure-aws-credentials@v1
69
+ env :
70
+ AWS_REGION : us-east-1
71
+ with :
72
+ aws-access-key-id : ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }}
73
+ aws-secret-access-key : ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }}
74
+ aws-region : ${{ env.AWS_REGION }}
75
+
76
+ - name : S3 CI | Copy release binary to S3 bucket
77
+ shell : bash
78
+ env :
79
+ BINARY_DIR : target/production
80
+ BINARY_FILE : aleph-node
81
+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node
82
+ S3BUCKET_FILE : aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz
83
+ run : |
84
+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
85
+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
86
+
87
+ - name : S3 CI | Copy release runtime to S3 bucket
88
+ shell : bash
89
+ env :
90
+ BINARY_DIR : target/production/wbuild/aleph-runtime
91
+ BINARY_FILE : aleph_runtime.compact.wasm
92
+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime
93
+ S3BUCKET_FILE : aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz
94
+ run : |
95
+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
96
+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
97
+
64
98
- name : Build test binary
65
99
run : cargo build --release -p aleph-node --features "short_session enable_treasury_proposals only_legacy"
66
100
@@ -80,5 +114,27 @@ jobs:
80
114
if-no-files-found : error
81
115
retention-days : 7
82
116
117
+ - name : S3 CI | Copy test binary to S3 bucket
118
+ shell : bash
119
+ env :
120
+ BINARY_DIR : target/release
121
+ BINARY_FILE : aleph-node
122
+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-node
123
+ S3BUCKET_FILE : aleph-test-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz
124
+ run : |
125
+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
126
+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
127
+
128
+ - name : S3 CI | Copy test runtime to S3 bucket
129
+ shell : bash
130
+ env :
131
+ BINARY_DIR : target/release/wbuild/aleph-runtime
132
+ BINARY_FILE : aleph_runtime.compact.wasm
133
+ S3BUCKET_URL : s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-runtime
134
+ S3BUCKET_FILE : aleph-test-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz
135
+ run : |
136
+ tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }}
137
+ aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }}
138
+
83
139
- name : Cleanup cache
84
140
uses : ./.github/actions/post-cache
0 commit comments