Skip to content

Commit

Permalink
reaching the limits of nektos/act here
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Dec 19, 2023
1 parent 89aae39 commit 05d07c7
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 50 deletions.
14 changes: 7 additions & 7 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ runs:
run: yarn --immutable
shell: bash

- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: ${{ inputs.version }}
# - name: Install Nargo
# uses: noir-lang/[email protected]
# with:
# toolchain: ${{ inputs.version }}

- name: Use Nargo
run: nargo --version
shell: bash
# - name: Use Nargo
# run: nargo --version
# shell: bash
35 changes: 9 additions & 26 deletions .github/scripts/latestStable.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,15 @@ async function main() {

const data = await res.json();

const latestStable = data
.filter(release => !release.tag_name.includes('aztec'))
.filter(release => !release.prerelease)
.map(release => release.tag_name)
.shift();

// const latestNightly = data
// .filter(release => !release.tag_name.includes('aztec'))
// .filter(release => release.prerelease)
// .map(release => release.tag_name)
// .shift();

// for (let release of releases) {
// const tagName = release.tag_name;
// const tagRes = await fetch(
// `https://api.github.com/repos/noir-lang/noir/git/ref/tags/${tagName}`,
// fetchOpts,
// );
// const tagData = await tagRes.json();

// // Attach commit SHA to release
// release.commit_sha = tagData.object.sha;
// }

// const output = JSON.stringify([latestStable]);
console.log(JSON.stringify([latestStable])); // DON'T REMOVE, GITHUB WILL CAPTURE THIS OUTPUT
const filtered = data.filter(
release => !release.tag_name.includes('aztec') && !release.tag_name.includes('nightly'),
);

const latestStable = filtered.find(release => !release.prerelease).tag_name;
const latestPreRelease = filtered.find(release => release.prerelease).tag_name;

const workflowOutput = JSON.stringify({ stable: latestStable, prerelease: latestPreRelease });
console.log(workflowOutput); // DON'T REMOVE, GITHUB WILL CAPTURE THIS OUTPUT
}

main();
43 changes: 26 additions & 17 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
# paths:
# - 'vite-hardhat/**'
# pull_request:
# paths:
# - 'vite-hardhat/**'
pull_request:
paths:
- 'vite-hardhat/**'

jobs:
setup:
Expand All @@ -28,7 +28,7 @@ jobs:
run: |
VERSIONS='${{ steps.versions_step.outputs.versionArray }}'
echo "Versions for Matrix: $VERSIONS"
MATRIX=$(echo "$VERSIONS" | jq -c '[.[] | {version: .}]')
MATRIX=$(echo "$VERSIONS" | jq -c '{versions: .} | .versions | to_entries | map({key: .key, value: (.value | sub("^v"; ""))})')
echo "::set-output name=matrix::{\"include\":$MATRIX}"
test-drift-vite-hardhat:
Expand All @@ -41,26 +41,29 @@ jobs:
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ (matrix.key == 'prerelease' && 'prerelease') || github.base_ref }}

- name: DEBUGGING
run: echo "${{ matrix.key }}"
- name: DEBUGGING2
run: echo "${{ github.base_ref }}"
- name: DEBUGGING3
run: echo "${{ github.head_ref }}"

- name: Set up test environment
uses: ./.github/actions/setup
with:
project: vite-hardhat
version: ${{ matrix.version }}

- name: Generate verifier contract
run: |
nargo codegen-verifier
working-directory: vite-hardhat/circuits
version: ${{ matrix.value }}

- name: Install test version
run: |
yarn add \
@noir-lang/noir_js@${{ matrix.version }} \
@noir-lang/backend_barretenberg@${{ matrix.version }} \
@noir-lang/noir_wasm@${{ matrix.version }} \
@noir-lang/source-resolver@${{ matrix.version }} \
@noir-lang/types@${{ matrix.version }}
@noir-lang/noir_js@${{ matrix.value }} \
@noir-lang/backend_barretenberg@${{ matrix.value }} \
@noir-lang/noir_wasm@${{ matrix.value }} \
@noir-lang/types@${{ matrix.value }}
- name: 'Create env file'
run: |
Expand All @@ -70,5 +73,11 @@ jobs:
echo MUMBAI_ALCHEMY_KEY"=${{ secrets.MUMBAI_ALCHEMY_KEY }}" >> .env
echo MUMBAI_DEPLOYER_PRIVATE_KEY="${{ secrets.MUMBAI_DEPLOYER_PRIVATE_KEY }}" >> .env
# - name: Run test
# run: yarn test
# - name: Generate verifier contract
# run: |
# nargo codegen-verifier
# working-directory: vite-hardhat/circuits

- name: Run test
run: yarn test
continue-on-error: ${{ matrix.key != 'prerelease' }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

node_modules
package-lock.json

# To use with nektos/act
.github/event.json

0 comments on commit 05d07c7

Please sign in to comment.