File tree Expand file tree Collapse file tree 5 files changed +27
-14
lines changed Expand file tree Collapse file tree 5 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 13
13
dfx-version : ${{ matrix.version }}
14
14
install-moc : true
15
15
vessel-version : 0.7.0
16
- pocketic- version : 3.0.1
16
+ pocket-ic- version : release-2024-04-24_23-01-base
17
17
- run : |
18
18
dfx --version
19
19
moc --version
Original file line number Diff line number Diff line change 1
1
# Setup The Internet Computer SDK
2
2
3
- This action sets up a ` dfx ` environment, also includes ` moc ` and ` vessel ` .
3
+ This action sets up a ` dfx ` environment, also includes ` moc ` , ` vessel ` and ` pocket-ic ` .
4
4
5
- ** !** Only supports Ubuntu/MacOS virtual environments.
5
+ ** !** Only supports Ubuntu/macOS virtual environments.
6
6
7
7
## Usage
8
8
9
9
``` yml
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- uses : actions/checkout@v4
13
- - uses : aviate-labs/setup-dfx@v0.3.0
13
+ - uses : aviate-labs/setup-dfx@v0.3.2
14
14
with :
15
15
vessel-version : 0.7.0
16
16
- run : for i in src/*.mo ; do $(vessel bin)/moc $(vessel sources) --check $i ; done
22
22
runs-on : ubuntu-latest
23
23
steps :
24
24
- uses : actions/checkout@v4
25
- - uses : aviate-labs/setup-dfx@v0.3.0
25
+ - uses : aviate-labs/setup-dfx@v0.3.2
26
26
with :
27
27
dfx-version : 0.18.0
28
28
env :
Original file line number Diff line number Diff line change 7
7
dfx-disable-encryption :
8
8
description : ' Whether to use the .pem encryption.'
9
9
default : " false"
10
- pocketic -version :
10
+ pocket-ic -version :
11
11
description : ' The pocket ic version to download. If empty pocket ic will not be installed.'
12
12
install-moc :
13
13
description : ' Whether to install moc through dfx.'
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ function run() {
56
56
let pocketicBuild = 'linux';
57
57
// Alter params if running on macOS.
58
58
if (os_1.default.platform() === 'darwin') {
59
- bin = '/usr/local/share ';
59
+ bin = '/Users/runner/bin ';
60
60
vesselBuild = 'macos';
61
61
pocketicBuild = 'darwin';
62
62
}
@@ -128,9 +128,15 @@ function run() {
128
128
infoExec(`${vesselPath} --version`);
129
129
}
130
130
// Install PocketIC.
131
- const pocketicVersion = core.getInput('pocketic -version');
131
+ const pocketicVersion = core.getInput('pocket-ic -version');
132
132
if (pocketicVersion) {
133
- child_process_1.default.execSync(`wget -O ${bin}/pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/${pocketicVersion}/pocket-ic-x86_64-${pocketicBuild}.gz`);
133
+ try {
134
+ child_process_1.default.execSync(`wget -O ${bin}/pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/${pocketicVersion}/pocket-ic-x86_64-${pocketicBuild}.gz`);
135
+ }
136
+ catch (error) {
137
+ core.debug(`Failed to download pocket-ic, trying to download from the main ic repo...`);
138
+ child_process_1.default.execSync(`wget -O ${bin}/pocket-ic.gz https://github.com/dfinity/ic/releases/download/${pocketicVersion}/pocket-ic-x86_64-${pocketicBuild}.gz`);
139
+ }
134
140
child_process_1.default.execSync(`gunzip ${bin}/pocket-ic.gz`);
135
141
child_process_1.default.execSync(`chmod +x ${bin}/pocket-ic`);
136
142
const pocketicPath = yield io.which('pocket-ic');
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export async function run() {
12
12
13
13
// Alter params if running on macOS.
14
14
if ( os . platform ( ) === 'darwin' ) {
15
- bin = '/usr/local/share ' ;
15
+ bin = '/Users/runner/bin ' ;
16
16
vesselBuild = 'macos' ;
17
17
pocketicBuild = 'darwin' ;
18
18
}
@@ -100,11 +100,18 @@ export async function run() {
100
100
}
101
101
102
102
// Install PocketIC.
103
- const pocketicVersion = core . getInput ( 'pocketic -version' ) ;
103
+ const pocketicVersion = core . getInput ( 'pocket-ic -version' ) ;
104
104
if ( pocketicVersion ) {
105
- cp . execSync (
106
- `wget -O ${ bin } /pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/${ pocketicVersion } /pocket-ic-x86_64-${ pocketicBuild } .gz`
107
- ) ;
105
+ try {
106
+ cp . execSync (
107
+ `wget -O ${ bin } /pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/${ pocketicVersion } /pocket-ic-x86_64-${ pocketicBuild } .gz`
108
+ ) ;
109
+ } catch ( error ) {
110
+ core . debug ( `Failed to download pocket-ic, trying to download from the main ic repo...` ) ;
111
+ cp . execSync (
112
+ `wget -O ${ bin } /pocket-ic.gz https://github.com/dfinity/ic/releases/download/${ pocketicVersion } /pocket-ic-x86_64-${ pocketicBuild } .gz`
113
+ ) ;
114
+ }
108
115
cp . execSync ( `gunzip ${ bin } /pocket-ic.gz` ) ;
109
116
cp . execSync ( `chmod +x ${ bin } /pocket-ic` ) ;
110
117
You can’t perform that action at this time.
0 commit comments