Skip to content

Commit

Permalink
matrix is ignored in notify, dunno why
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Dec 21, 2023
1 parent 4d920df commit 860723d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 26 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/vite_hardhat_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ jobs:
matrix:
version: ${{ fromJson(needs.vite-hardhat-setup.outputs.versions) }}
# if it errors, we still need to know about it!
continue-on-error: true
outputs:
is_stable: ${{ steps.get-stability.outputs.is_stable }}
steps:
- uses: actions/checkout@v4

- name: Set up yarn
continue-on-error: true
uses: ./.github/actions/setup-yarn
with:
project: vite-hardhat

- name: Set up nargo
continue-on-error: true
uses: ./.github/actions/setup-nargo
with:
version: ${{ matrix.version }}

- name: Get stability
continue-on-error: true
id: get-stability
env:
VERSIONS_MAP: ${{ needs.vite-hardhat-setup.outputs.versions_map }}
Expand All @@ -79,6 +79,7 @@ jobs:
echo "::set-output name=is_stable::$IS_STABLE"
- name: Install test version
continue-on-error: true
run: |
yarn add \
@noir-lang/noir_js@${{ matrix.version }} \
Expand All @@ -87,6 +88,7 @@ jobs:
@noir-lang/types@${{ matrix.version }}
- name: 'Create env file'
continue-on-error: true
run: |
touch .env
echo SEPOLIA_ALCHEMY_KEY="${{ secrets.SEPOLIA_ALCHEMY_KEY }}" >> .env
Expand All @@ -95,25 +97,19 @@ jobs:
echo MUMBAI_DEPLOYER_PRIVATE_KEY="${{ secrets.MUMBAI_DEPLOYER_PRIVATE_KEY }}" >> .env
- name: Generate verifier contract
continue-on-error: true
run: |
nargo codegen-verifier
working-directory: vite-hardhat/circuits

- name: Run test
continue-on-error: true
run: yarn test
id: yarn_test

notify:
needs: [vite-hardhat-test-drift, vite-hardhat-setup]
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.vite-hardhat-setup.outputs.versions) }}
if: ${{ needs.vite-hardhat-test-drift.result == 'failure' }}
steps:
- name: Send GitHub Action trigger data to Slack workflow - Stable
uses: slackapi/[email protected]
if: ${{ needs.vite-hardhat-test-drift.outputs.is_stable == 'true' }}
if: ${{ failure() && steps.get-stability.outputs.is_stable == 'true' }}
with:
payload: |
{
Expand All @@ -124,7 +120,7 @@ jobs:

- name: Send GitHub Action trigger data to Slack workflow - Prerelease
uses: slackapi/[email protected]
if: ${{ needs.vite-hardhat-test-drift.outputs.is_stable == 'false' }}
if: ${{ failure() && steps.get-stability.outputs.is_stable == 'false' }}
with:
payload: |
{
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/with_foundry_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,21 @@ jobs:
fail-fast: false
matrix:
version: ${{ fromJson(needs.with-foundry-setup.outputs.versions) }}
# if it errors, we still need to know about it!
continue-on-error: true
outputs:
is_stable: ${{ steps.get-stability.outputs.is_stable }}
steps:
- uses: actions/checkout@v4

- name: Set up nargo
continue-on-error: true
uses: ./.github/actions/setup-nargo
with:
version: ${{ matrix.version }}

- name: Set up foundry
continue-on-error: true
uses: ./.github/actions/setup-foundry

- name: Get stability
continue-on-error: true
id: get-stability
env:
VERSIONS_MAP: ${{ needs.with-foundry-setup.outputs.versions_map }}
Expand All @@ -76,6 +75,7 @@ jobs:
echo "::set-output name=is_stable::$IS_STABLE"
- name: Install test version
continue-on-error: true
run: |
yarn add \
@noir-lang/noir_js@${{ matrix.version }} \
Expand All @@ -84,35 +84,32 @@ jobs:
@noir-lang/types@${{ matrix.version }}
- name: 'Create env file'
continue-on-error: true
run: |
touch .env
echo LOCALHOST_PRIVATE_KEY="${{ secrets.LOCALHOST_PRIVATE_KEY }}" >> .env
echo ANVIL_RPC="${{ secrets.ANVIL_RPC }}" >> .env
- name: Generate verifier contract
continue-on-error: true
run: |
nargo codegen-verifier
working-directory: with-foundry/circuits

- name: Generate proof
continue-on-error: true
run: |
nargo prove
working-directory: with-foundry/circuits

- name: Test with Foundry
continue-on-error: true
run: |
forge test --optimize --optimizer-runs 5000 --evm-version london
notify:
needs: [with-foundry-test-drift, with-foundry-setup]
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.with-foundry-setup.outputs.versions) }}
steps:
- name: Send GitHub Action trigger data to Slack workflow - Stable
uses: slackapi/[email protected]
if: ${{ needs.with-foundry-test-drift.outputs.is_stable == 'true' }}
if: ${{ failure() && steps.get-stability.outputs.is_stable == 'true' }}
with:
payload: |
{
Expand All @@ -123,7 +120,7 @@ jobs:

- name: Send GitHub Action trigger data to Slack workflow - Prerelease
uses: slackapi/[email protected]
if: ${{ needs.with-foundry-test-drift.outputs.is_stable == 'false' }}
if: ${{ failure() && steps.get-stability.outputs.is_stable == 'false' }}
with:
payload: |
{
Expand Down

0 comments on commit 860723d

Please sign in to comment.