Skip to content

Commit

Permalink
Merge pull request #1720 from o1-labs/chore/upd-branching-strategy
Browse files Browse the repository at this point in the history
Respect the updated branching strategy.
  • Loading branch information
shimkiv authored Jul 4, 2024
2 parents e8f64bb + b280724 commit c710b6a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/actions/live-tests-shared/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
cat profiling.md >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Upload Mina logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
continue-on-error: true
if: always()
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- berkeley
- develop
pull_request:
workflow_dispatch: {}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- berkeley
- develop
pull_request:
workflow_dispatch: {}
Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:
- name: Execute E2E tests
run: npm run test:e2e
- name: Upload E2E test artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
continue-on-error: true
if: always()
with:
Expand All @@ -95,9 +94,10 @@ jobs:
npm ci
npm run build
- name: Publish to NPM if version has changed
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
strategy: upgrade
env:
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand All @@ -121,9 +121,10 @@ jobs:
npm ci
npm run prepublishOnly
- name: Publish to NPM if version has changed
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: './src/mina-signer/package.json'
strategy: upgrade
env:
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 3 additions & 6 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '16'

node-version: '18'
- name: Run typedoc
run: |
git submodule update --init --recursive
npm ci
npx typedoc --tsconfig tsconfig.node.json src/index.ts
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/live-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@ on:
push:
branches:
- main
- berkeley
- develop
pull_request:
branches:
- main
- berkeley
- develop
workflow_dispatch: {}

jobs:
berkeley:
master:
timeout-minutes: 45
runs-on: ubuntu-latest
services:
mina-local-network:
image: o1labs/mina-local-network:berkeley-latest-lightnet
image: o1labs/mina-local-network:master-latest-lightnet
env:
NETWORK_TYPE: 'single-node'
PROOF_LEVEL: 'none'
Expand All @@ -36,4 +32,28 @@ jobs:
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
mina-branch-name: berkeley
mina-branch-name: master
compatible:
timeout-minutes: 45
runs-on: ubuntu-latest
services:
mina-local-network:
image: o1labs/mina-local-network:compatible-latest-lightnet
env:
NETWORK_TYPE: 'single-node'
PROOF_LEVEL: 'none'
ports:
- 3085:3085
- 5432:5432
- 8080:8080
- 8181:8181
- 8282:8282
volumes:
- /tmp:/root/logs
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use shared steps for live testing jobs
uses: ./.github/actions/live-tests-shared
with:
mina-branch-name: compatible
32 changes: 18 additions & 14 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,33 @@ o1js uses these types to ensure that the constants used in the protocol are cons

## Development

### Branch Compatibility
### Branching Policy

If you work on o1js, create a feature branch off of one of these base branches. It's encouraged to submit your work-in-progress as a draft PR to raise visibility! When working with submodules and various interconnected parts of the stack, ensure you are on the correct branches that are compatible with each other.
| o1js base branches | Is default? |
| ------------------ | ----------- |
| main | **Yes** |
| develop | No |

#### How to Use the Branches
When you start your work on o1js, please create the feature branch off of one of the above base branches.
It's encouraged to submit your work-in-progress as a draft PR to raise visibility!
When working with submodules and various interconnected parts of the stack, ensure you are on the correct branches that are compatible with each other.

**Default to `main` as the base branch**.

The other base branches (`berkeley` and `develop`) are used only in specific scenarios where you want to adapt o1js to changes in the sibling repos on those other branches. Even then, consider whether it is feasible to land your changes to `main` and merge to `berkeley` and `develop` afterwards. Only changes in `main` will ever be released, so anything in the other branches has to be backported and reconciled with `main` eventually.
Other base branches (currently `develop` only) are used in specific scenarios where you want to adapt o1js to changes in the sibling repos on those other branches. Even then, consider whether it is feasible to land your changes to `main` and merge to `develop` afterwards. Only changes in `main` will ever be released, so anything in other branches has to be backported and reconciled with the `main` branch eventually.

| Repository | mina -> o1js -> o1js-bindings |
| ---------- | -------------------------------- |
| Branches | o1js-main -> main -> main |
| | berkeley -> berkeley -> berkeley |
| | develop -> develop -> develop |
#### Relationship Between Repositories and Branches

- `o1js-main`: The `o1js-main` branch in the Mina repository corresponds to the `main` branch in both o1js and o1js-bindings repositories. This branch is where stable releases and ramp-up features are maintained. The `o1js-main` branch runs in parallel to the Mina `berkeley` branch and does not have a subset or superset relationship with it. The branching structure is as follows (<- means direction to merge):
| Repository | o1js &rarr; | o1js-bindings &rarr; | mina |
| ---------- | ----------- | -------------------- | ---------- |
| Branches | main | main | compatible |
| | develop | develop | develop |

- `develop` <- `o1js-main` <- `current testnet` - Typically, the current Testnet often corresponds to the rampup branch.
Where:

- `berkeley`: The `berkeley` branch is maintained across all three repositories. This branch is used for features and updates specific to the Berkeley release of the project.
- `compatible`: This is the [Mina repository](https://github.com/MinaProtocol/mina) branch. It corresponds to the `main` branch in both o1js and o1js-bindings repositories. This branch is where stable releases and soft-fork features are maintained.

- `develop`: The `develop` branch is also maintained across all three repositories. It is used for ongoing development, testing new features, and integration work.
- `develop`: This branch is maintained across all three repositories. It is used for ongoing (next hard-fork) development, testing new features and integration work.

### Running Tests

Expand Down Expand Up @@ -193,7 +197,7 @@ docker run --rm --pull=missing -it \
-p 8080:8080 \
-p 8181:8181 \
-p 8282:8282 \
o1labs/mina-local-network:o1js-main-latest-lightnet
o1labs/mina-local-network:compatible-latest-lightnet
```

See the [Docker Hub repository](https://hub.docker.com/r/o1labs/mina-local-network) for more information.
Expand Down

0 comments on commit c710b6a

Please sign in to comment.