-
Notifications
You must be signed in to change notification settings - Fork 408
131 lines (123 loc) · 5.37 KB
/
check-interface-spec-compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# A GitHub Actions workflow that regularly installs the latest replica and builds/deploys all examples
name: Check Examples Compatibility with Latest IC SHA
on:
# TODO: remove `push` trigger; this is only for testing
push:
schedule:
# run the test suite every monday
- cron: '0 0 * * MON'
jobs:
build-and-deploy-examples-against-latest-ic-sha-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# First, check if there is a newer version and update the artifacts referencing the version
- name: Check new ic version
id: update
run: |
# Not all ic commits are built and released, so we go through the last commits until we found one
# which has associated artefacts
while read -r sha
do
echo "sha: $sha"
# Send a HEAD to the URL to see if it exists
if curl --fail --head --silent --location \
"https://download.dfinity.systems/ic/$sha/binaries/x86_64-linux/replica.gz"
then
echo "$sha appears to have associated binary, using"
latest_sha="$sha"
break
else
echo "$sha does not seem to have associated binary"
fi
done < <(curl \
-SsL \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/dfinity/ic/commits | jq -cMr '.[] | .sha')
# If we couldn't find any sha with associated artefacts, abort
if [ -z "${latest_sha:-}" ]
then
echo no sha found
exit 1
fi
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/replica.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/canister_sandbox.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-admin.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-btc-adapter.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-https-outcalls-adapter.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-nns-init.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-starter.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/sandbox_launcher.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/sns.gz"
- name: Provision environment
run: |
.github/workflows/provision-linux.sh
- name: Overwrite artifacts in dfx cache
run: |
gzip -d replica.gz
mv replica $(dfx cache show)
gzip -d canister_sandbox.gz
mv canister_sandbox $(dfx cache show)
gzip -d ic-admin.gz
mv ic-admin $(dfx cache show)
gzip -d ic-btc-adapter.gz
mv ic-btc-adapter $(dfx cache show)
gzip -d ic-https-outcalls-adapter.gz
mv ic-https-outcalls-adapter $(dfx cache show)
gzip -d ic-nns-init.gz
mv ic-nns-init $(dfx cache show)
gzip -d ic-starter.gz
mv ic-starter $(dfx cache show)
gzip -d sandbox_launcher.gz
mv sandbox_launcher $(dfx cache show)
gzip -d sns.gz
mv sns $(dfx cache show)
- name: Build and deploy all examples
run: |
.github/workflows/hosting-photo-storage-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/hosting-static-website-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/hosting-unity-webgl-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-actor-reference-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-basic-bitcoin.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-basic-dao-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-calc-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-cert-var-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-classes-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-composite-query-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-counter-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-defi-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-dip721-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-echo-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-encrypted-notes-example.test.sh
- name: Build and deploy all examples
run: |
.github/workflows/motoko-encrypted-notes-vetkd-example.test.sh