-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use mold linker in nix env on Linux (#2628)
* nix: use mold on linux The build and test CI workflows already use mold. So this change only affects development in the nix environments on Linux systems. * CI: ensure nix dev env works on ARM based macOS * chore: fix flake.nix on MacOS * don't use pkgs in overlay I guess when the overlay is applied there is a `pkgs` in scope, but not sure. Probably more idiomatic to refer to attributes of `prev` which is the package set before applying the overlay. * CI: use `just build` instead of custom command Also covers the sequencer-sqlite crate.
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This workflow ensures that the nix dev env works on ARM based macOS. | ||
name: Nix env macOS ARM | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
tags: | ||
# YYYYMMDD | ||
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*" | ||
pull_request: | ||
branches: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUST_LOG: info,libp2p=off | ||
|
||
jobs: | ||
nix-env-macos-arm: | ||
timeout-minutes: 60 | ||
runs-on: macos-latest | ||
steps: | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v30 | ||
|
||
- name: Enable Cachix | ||
uses: cachix/cachix-action@v15 | ||
# If PR is from a non-collaborator (e. g. dependabot) the secrets are missing and the login to cachix fails. | ||
continue-on-error: true | ||
with: | ||
name: espresso-systems-private | ||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
extraPullNames: nix-community | ||
skipPush: ${{ github.actor == 'dependabot[bot]' }} | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
name: Enable Rust Caching | ||
with: | ||
prefix-key: v0-rust | ||
|
||
- name: Activate nix env | ||
run: nix develop --accept-flake-config -c echo Ok | ||
|
||
- name: Build rust crates | ||
run: nix develop --accept-flake-config -c just build | ||
|
||
- name: Build contracts | ||
run: nix develop --accept-flake-config -c forge build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters