Skip to content

Commit

Permalink
restore cci job and hide gha one for now
Browse files Browse the repository at this point in the history
  • Loading branch information
twoshark committed Nov 15, 2023
1 parent 0bd6c87 commit 99b9fb8
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 52 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,13 @@ jobs:
echo "Required RPC URLs are not available."
exit 1
fi
workflows:
version: 2
check_rpc_endpoints:
jobs:
- check_sepolia_rpc_endpoints:
- check_goerli_rpc_endpoints:
- check_mainnet_rpc_endpoints:
on_success:
- example_mainnet_job
104 changes: 52 additions & 52 deletions .github/workflows/define_rpc_endpoints.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
name: Verify and Define RPC Endpoints

on: [push] # Trigger the workflow on push

jobs:
check_rpc_endpoints:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- network: 'sepolia'
l1_rpc_url: "https://ci-sepolia-l1.optimism.io"
l2_rpc_url: "https://sepolia.optimism.io"
- network: 'goerli'
l1_rpc_url: "https://ci-goerli-l1.optimism.io"
l2_rpc_url: "https://goerli.optimism.io"
- network: 'mainnet'
l1_rpc_url: "https://ci-mainnet-l1.optimism.io"
l2_rpc_url: "https://mainnet.optimism.io"
outputs:
l1_rpc_url: ${{ steps.check_endpoints.outputs.l1_rpc_url }}
l2_rpc_url: ${{ steps.check_endpoints.outputs.l2_rpc_url }}
steps:
- uses: actions/checkout@v2

- name: Check RPC Endpoints
id: check_endpoints
run: |
curl ifconfig.me
if ops/verify-geth-endpoint.sh "${{ matrix.l1_rpc_url }}"; then
if ops/verify-geth-endpoint.sh "${{ matrix.l2_rpc_url }}"; then
echo "Both RPC endpoints are up to date and not syncing."
echo "l1_rpc_url=${{ matrix.l1_rpc_url }}" >> $GITHUB_OUTPUT
echo "l2_rpc_url=${{ matrix.l2_rpc_url }}" >> $GITHUB_OUTPUT
else
echo "L2 RPC endpoint for ${{ matrix.network }} failed the checks."
exit 1
fi
else
echo "L1 RPC endpoint for ${{ matrix.network }} failed the checks."
exit 1
fi
example_mainnet_job:
needs: check_rpc_endpoints
runs-on: ubuntu-latest
steps:
- name: Use RPC URLs
run: |
curl ifconfig.me.
L1_RPC_URL=${{ needs.check_rpc_endpoints.outputs.l1_rpc_url }}
L2_RPC_URL=${{ needs.check_rpc_endpoints.outputs.l2_rpc_url }}
echo "L1 RPC URL: $L1_RPC_URL"
echo "L2 RPC URL: $L2_RPC_URL"
# Use L1_RPC_URL and L2_RPC_URL here.
#on: [push] # Trigger the workflow on push
#
#jobs:
# check_rpc_endpoints:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# include:
# - network: 'sepolia'
# l1_rpc_url: "https://ci-sepolia-l1.optimism.io"
# l2_rpc_url: "https://sepolia.optimism.io"
# - network: 'goerli'
# l1_rpc_url: "https://ci-goerli-l1.optimism.io"
# l2_rpc_url: "https://goerli.optimism.io"
# - network: 'mainnet'
# l1_rpc_url: "https://ci-mainnet-l1.optimism.io"
# l2_rpc_url: "https://mainnet.optimism.io"
# outputs:
# l1_rpc_url: ${{ steps.check_endpoints.outputs.l1_rpc_url }}
# l2_rpc_url: ${{ steps.check_endpoints.outputs.l2_rpc_url }}
# steps:
# - uses: actions/checkout@v2
#
# - name: Check RPC Endpoints
# id: check_endpoints
# run: |
# curl ifconfig.me
# if ops/verify-geth-endpoint.sh "${{ matrix.l1_rpc_url }}"; then
# if ops/verify-geth-endpoint.sh "${{ matrix.l2_rpc_url }}"; then
# echo "Both RPC endpoints are up to date and not syncing."
# echo "l1_rpc_url=${{ matrix.l1_rpc_url }}" >> $GITHUB_OUTPUT
# echo "l2_rpc_url=${{ matrix.l2_rpc_url }}" >> $GITHUB_OUTPUT
# else
# echo "L2 RPC endpoint for ${{ matrix.network }} failed the checks."
# exit 1
# fi
# else
# echo "L1 RPC endpoint for ${{ matrix.network }} failed the checks."
# exit 1
# fi
# example_mainnet_job:
# needs: check_rpc_endpoints
# runs-on: ubuntu-latest
# steps:
# - name: Use RPC URLs
# run: |
# curl ifconfig.me.
# L1_RPC_URL=${{ needs.check_rpc_endpoints.outputs.l1_rpc_url }}
# L2_RPC_URL=${{ needs.check_rpc_endpoints.outputs.l2_rpc_url }}
# echo "L1 RPC URL: $L1_RPC_URL"
# echo "L2 RPC URL: $L2_RPC_URL"
# # Use L1_RPC_URL and L2_RPC_URL here.

0 comments on commit 99b9fb8

Please sign in to comment.