Skip to content

Commit

Permalink
Merge pull request #1294 from rainlanguage/2024-02-13-flake-hub
Browse files Browse the repository at this point in the history
  • Loading branch information
hardyjosh authored Feb 13, 2025
2 parents 3e75bd5 + 34c9061 commit 253d9c8
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 36 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
network:
description: 'Network to deploy to'
description: "Network to deploy to"
required: true
type: choice
options:
Expand All @@ -23,6 +23,9 @@ on:

jobs:
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +34,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: nix develop -c rainix-sol-prelude

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/git-clean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:

jobs:
git-clean:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -15,7 +18,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

# Build metas etc. required to do a correct pointer build.
- run: ./pointers.sh
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/manual-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ on:
workflow_dispatch:
inputs:
version-level:
description: 'Select Version Level'
description: "Select Version Level"
required: true
type: choice
options:
- alpha # Increase the alpha pre-version (x.y.z-alpha.M)
- beta # Increase the beta pre-version (x.y.z-beta.M)
- patch # Increase the patch version (x.y.z)
- minor # Increase the minor version (x.y.0)
- major # Increase the major version (x.0.0)
- alpha # Increase the alpha pre-version (x.y.z-alpha.M)
- beta # Increase the beta pre-version (x.y.z-beta.M)
- patch # Increase the patch version (x.y.z)
- minor # Increase the minor version (x.y.0)
- major # Increase the major version (x.0.0)
- release # Remove the pre-version, ie remove alpha/beta/rc (x.y.z)
- rc # Increase the rc pre-version (x.y.z-rc.M)
- rc # Increase the rc pre-version (x.y.z-rc.M)

jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
DEPLOY_METABOARD_ADDRESS: ${{ vars.CI_DEPLOY_SEPOLIA_METABOARD_ADDRESS }}
Expand All @@ -36,14 +39,16 @@ jobs:
with:
ssh-key: ${{ secrets.PUBLISH_PRIVATE_KEY }}

- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- name: Install NodeJS v22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache: "npm"

- run: nix develop -c rainix-sol-prelude
working-directory: lib/rain.interpreter
Expand All @@ -56,7 +61,7 @@ jobs:
- run: nix develop -c rainix-sol-prelude
- run: nix develop -c rainix-rs-prelude
- run: nix develop -c raindex-prelude

- name: Test JS/TS Binding 1/2
run: nix develop -c rainix-wasm-test

Expand Down Expand Up @@ -88,7 +93,7 @@ jobs:
# Push the commit to remote
- name: Push Changes To Remote
run: |
run: |
git push origin
git push -u origin ${{ env.NEW_VERSION }}
env:
Expand Down Expand Up @@ -118,4 +123,4 @@ jobs:
name: Package Release ${{ env.NEW_VERSION }}
files: orderbook_npm_package_${{ env.NEW_VERSION }}.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 8 additions & 3 deletions .github/workflows/manual-rs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ on: [workflow_dispatch]
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: nix develop --command cargo release --workspace
- run: nix develop --command cargo release --workspace
15 changes: 10 additions & 5 deletions .github/workflows/manual-sol-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
network:
description: 'Network to deploy to'
description: "Network to deploy to"
required: true
type: choice
options:
Expand All @@ -23,7 +23,7 @@ on:
- matchain

suite:
description: 'Suite to deploy'
description: "Suite to deploy"
required: true
type: choice
options:
Expand All @@ -36,6 +36,9 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- run: |
network=${{ inputs.network }}
Expand All @@ -54,7 +57,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: nix develop -c rainix-sol-prelude
- run: nix develop -c rainix-rs-prelude
Expand All @@ -64,7 +69,7 @@ jobs:
run: nix develop -c rainix-sol-artifacts
env:
DEPLOYMENT_SUITE: ${{ inputs.suite }}
DEPLOY_BROADCAST: '1'
DEPLOY_BROADCAST: "1"
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
ETH_RPC_URL: ${{ secrets[env.rpc_secret_name] || vars[env.rpc_secret_name] || '' }}
ETHERSCAN_API_KEY: ${{ secrets[env.etherscan_api_key_secret_name] || vars[env.etherscan_api_key_secret_name] || ''}}
Expand All @@ -73,4 +78,4 @@ jobs:
DEPLOY_VERIFIER_URL: ${{ secrets[env.verifier_url_secret_name] || vars[env.verifier_url_secret_name] || '' }}
DEPLOY_METABOARD_ADDRESS: ${{ secrets[env.metaboard_address_secret_name] || vars[env.metaboard_address_secret_name] || '' }}
DEPLOY_ROUTE_PROCESSOR_4_ADDRESS: ${{ secrets[env.route_processor_4_address_secret_name] || vars[env.route_processor_4_address_secret_name] || '' }}
DEPLOY_RAINDEX_ADDRESS: ${{ secrets[env.raindex_address_secret_name] || vars[env.raindex_address_secret_name] || '' }}
DEPLOY_RAINDEX_ADDRESS: ${{ secrets[env.raindex_address_secret_name] || vars[env.raindex_address_secret_name] || '' }}
9 changes: 7 additions & 2 deletions .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:

jobs:
standard-tests:
permissions:
id-token: write
contents: read
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand Down Expand Up @@ -76,8 +79,10 @@ jobs:
df -h
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./pointers.sh

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tauri-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
publish-tauri:
permissions:
id-token: write
contents: write
strategy:
fail-fast: false
Expand Down Expand Up @@ -62,8 +63,10 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./prep-all.sh
env:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/tauri.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:

jobs:
build-tauri:
permissions:
id-token: write
contents: read
strategy:
fail-fast: ${{ github.ref != 'refs/heads/main' }}
matrix:
Expand Down Expand Up @@ -61,8 +64,10 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./prep-all.sh
env:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test-subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:

jobs:
test:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest

steps:
Expand All @@ -17,8 +20,10 @@ jobs:
submodules: recursive

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- name: Build subgraph
run: nix develop -c subgraph-build
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-ui-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:

jobs:
test:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.sha }}
Expand All @@ -17,7 +20,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./prep-all.sh
env:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-webapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:

jobs:
test:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.sha }}
Expand All @@ -17,7 +20,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./prep-all.sh
env:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/vercel-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
COMMIT_SHA: ${{ github.sha }}
steps:
Expand All @@ -22,7 +25,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./prep-all.sh
env:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/vercel-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- main
jobs:
Deploy-Preview:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.sha }}
Expand All @@ -18,7 +21,9 @@ jobs:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
determinate: true
- uses: DeterminateSystems/flakehub-cache-action@main

- run: ./prep-all.sh
env:
Expand Down

0 comments on commit 253d9c8

Please sign in to comment.