Skip to content

Commit

Permalink
chore: update test workflows to use dfxvm (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity authored Feb 9, 2024
1 parent 781b9e8 commit 1802f72
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 70 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/motoko-encrypted-notes-vetkd-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
paths:
- motoko/encrypted-notes-dapp-vetkd/**
- motoko/encrypted-notes-dapp-vetkd/provision-darwin.sh
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-encrypted-notes-vetkd-example.yml
concurrency:
Expand All @@ -19,8 +19,8 @@ jobs:
- uses: actions/checkout@v1
- name: Provision Darwin
env:
DFX_VERSION: 0.14.2
run: bash motoko/encrypted-notes-dapp-vetkd/provision-darwin.sh
NODE_VERSION: 14.21.3
run: bash .github/workflows/provision-darwin.sh
- name: Motoko Encrypted Notes Darwin (unit tests)
run: |
pushd motoko/encrypted-notes-dapp-vetkd
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/motoko-hello_cycles-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: bash .github/workflows/provision-darwin.sh
- name: Motoko Hello Cycles Darwin
run: |
dfx upgrade
dfxvm update
dfx start --background --clean
pushd motoko/hello_cycles
make test
Expand All @@ -34,7 +34,7 @@ jobs:
run: bash .github/workflows/provision-linux.sh
- name: Motoko Hello Cycles Linux
run: |
dfx upgrade
dfxvm update
dfx start --background --clean
pushd motoko/hello_cycles
make test
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/provision-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ sudo installer -pkg node.pkg -store -target /
rm node.pkg

# Install DFINITY SDK.
curl --location --output install-dfx.sh "https://internetcomputer.org/install.sh"
DFX_VERSION=${DFX_VERSION:=0.16.1} bash install-dfx.sh < <(yes Y)
curl --location --output install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/dfxvm-install-script/install.sh"
DFX_VERSION=${DFX_VERSION:=0.16.1} DFXVM_INIT_YES=true bash install-dfx.sh
rm install-dfx.sh
echo "$HOME/Library/Application Support/org.dfinity.dfx/bin" >> $GITHUB_PATH
source "$HOME/Library/Application Support/org.dfinity.dfx/env"
dfx cache install

# Install ic-repl
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/provision-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ sudo apt-get install --yes nodejs
rm install-node.sh

# Install DFINITY SDK.
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
DFX_VERSION=${DFX_VERSION:=0.16.1} bash install-dfx.sh < <(yes Y)
wget --output-document install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/dfxvm-install-script/install.sh"
DFX_VERSION=${DFX_VERSION:=0.16.1} DFXVM_INIT_YES=true bash install-dfx.sh
rm install-dfx.sh
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
source "$HOME/.local/share/dfx/env"
dfx cache install

# Install ic-repl
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/rust-encrypted-notes-vetkd-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
paths:
- motoko/encrypted-notes-dapp-vetkd/**
- motoko/encrypted-notes-dapp-vetkd/provision-darwin.sh
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/rust-encrypted-notes-vetkd-example.yml
concurrency:
Expand All @@ -20,7 +20,8 @@ jobs:
- name: Provision Darwin
env:
DFX_VERSION: 0.14.2
run: bash motoko/encrypted-notes-dapp-vetkd/provision-darwin.sh
NODE_VERSION: 14.21.3
run: bash .github/workflows/provision-darwin.sh
- name: Rust Encrypted Notes Darwin (unit tests)
run: |
pushd motoko/encrypted-notes-dapp-vetkd
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-send-http-get-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: bash .github/workflows/provision-darwin.sh
- name: Rust Send HTTP GET Darwin
run: |
dfx upgrade
dfxvm update
dfx start --background
pushd rust/send_http_get
RUSTFLAGS=-Ctarget-cpu=mvp make test
Expand All @@ -34,7 +34,7 @@ jobs:
run: bash .github/workflows/provision-linux.sh
- name: Rust Send HTTP GET Linux
run: |
dfx upgrade
dfxvm update
dfx start --background
pushd rust/send_http_get
RUSTFLAGS=-Ctarget-cpu=mvp make test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-send-http-post-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: bash .github/workflows/provision-darwin.sh
- name: Rust Send HTTP POST Darwin
run: |
dfx upgrade
dfxvm update
dfx start --background
pushd rust/send_http_post
RUSTFLAGS=-Ctarget-cpu=mvp make test
Expand All @@ -34,7 +34,7 @@ jobs:
run: bash .github/workflows/provision-linux.sh
- name: Rust Send HTTP POST Linux
run: |
dfx upgrade
dfxvm update
dfx start --background
pushd rust/send_http_post
RUSTFLAGS=-Ctarget-cpu=mvp make test
Expand Down
55 changes: 0 additions & 55 deletions motoko/encrypted-notes-dapp-vetkd/provision-darwin.sh

This file was deleted.

0 comments on commit 1802f72

Please sign in to comment.