Skip to content

Commit

Permalink
fix: broken CI on master (#284)
Browse files Browse the repository at this point in the history
The way DFX is installed has changed, causing our CI script to fail.
This commit updates it to use the official github action to avoid this
from happening again in the future.
  • Loading branch information
ielashi authored Mar 28, 2024
1 parent d2bff8a commit b607277
Showing 1 changed file with 70 additions and 107 deletions.
177 changes: 70 additions & 107 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run scenario 1
run: |
Expand All @@ -181,13 +178,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run scenario 2
run: |
Expand All @@ -213,13 +207,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run scenario 3
run: |
Expand All @@ -245,13 +236,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run disable api if not fully synced flag
run: |
Expand All @@ -277,13 +265,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run charge cycles on reject
run: |
Expand All @@ -309,13 +294,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run upgradability test
run: |
Expand All @@ -341,49 +323,42 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run set_config test
run: |
bash e2e-tests/set_config.sh
cycles_burn:
runs-on: ubuntu-20.04
needs: cargo-build

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Run cycles_burn test
run: |
bash e2e-tests/cycles_burn.sh
runs-on: ubuntu-20.04
needs: cargo-build

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run cycles_burn test
run: bash e2e-tests/cycles_burn.sh

benchmark:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -448,13 +423,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run health_status test
run: |
Expand All @@ -480,13 +452,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run get_config test
run: |
Expand All @@ -512,13 +481,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run metrics test
run: |
Expand All @@ -544,13 +510,10 @@ jobs:
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Install DFX
run: |
wget --output-document install-dfx.sh "https://internetcomputer.org/install.sh"
bash install-dfx.sh < <(yes Y)
rm install-dfx.sh
dfx cache install
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: $DFX_VERSION

- name: Run upgradability test
run: |
Expand Down

0 comments on commit b607277

Please sign in to comment.