From 948b93ed07369e539513da3e5e9d520dc7274462 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Tue, 12 May 2026 22:59:24 +0400 Subject: [PATCH] feat: migrate to soldeer + use upstream CI reusable Drop git submodules in favour of soldeer-managed dependencies, in preparation for publishing sol.lib.binmaskflag to soldeer.xyz. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/publish-soldeer.yaml | 8 +++++ .github/workflows/rainix-sol.yaml | 6 ++++ .github/workflows/rainix.yaml | 43 -------------------------- .gitignore | 24 +++++--------- .gitmodules | 3 -- .soldeerignore | 24 ++++++++++++++ REUSE.toml | 27 ++++++++-------- foundry.toml | 8 +++++ lib/forge-std | 1 - soldeer.lock | 6 ++++ test/Binary.t.sol | 2 +- 11 files changed, 75 insertions(+), 77 deletions(-) create mode 100644 .github/workflows/publish-soldeer.yaml create mode 100644 .github/workflows/rainix-sol.yaml delete mode 100644 .github/workflows/rainix.yaml delete mode 100644 .gitmodules create mode 100644 .soldeerignore delete mode 160000 lib/forge-std create mode 100644 soldeer.lock diff --git a/.github/workflows/publish-soldeer.yaml b/.github/workflows/publish-soldeer.yaml new file mode 100644 index 0000000..066aa41 --- /dev/null +++ b/.github/workflows/publish-soldeer.yaml @@ -0,0 +1,8 @@ +name: Publish to Soldeer +on: + push: + tags: ["v*"] +jobs: + publish: + uses: rainlanguage/rainix/.github/workflows/publish-soldeer.yaml@main + secrets: inherit diff --git a/.github/workflows/rainix-sol.yaml b/.github/workflows/rainix-sol.yaml new file mode 100644 index 0000000..827ab30 --- /dev/null +++ b/.github/workflows/rainix-sol.yaml @@ -0,0 +1,6 @@ +name: rainix-sol +on: [push] +jobs: + rainix-sol: + uses: rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main + secrets: inherit diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml deleted file mode 100644 index b489675..0000000 --- a/.github/workflows/rainix.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Rainix CI -on: [push] - -jobs: - rainix: - strategy: - matrix: - os: [ubuntu-latest] - task: [rainix-sol-test, rainix-sol-static, rainix-sol-legal] - fail-fast: false - runs-on: ${{ matrix.os }} - env: - DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - - uses: nixbuild/nix-quick-install-action@v30 - with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G - - - run: nix develop -c rainix-sol-prelude - - name: Run ${{ matrix.task }} - env: - ETH_RPC_URL: ${{ secrets.CI_DEPLOY_RPC_URL }} - ETHERSCAN_API_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }} - DEPLOY_VERIFIER: 'etherscan' - run: nix develop -c ${{ matrix.task }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4485edc..7a7e7f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,9 @@ -# Cargo -.cargo - -# Compiler files -cache/ -out/ - -# Ignores development broadcast logs -!/broadcast -/broadcast/*/31337/ -/broadcast/**/dry-run/ - -# Docs -docs/ - -# Dotenv file +out +cache +result .env +.fixes +dependencies +remappings.txt +.pre-commit-config.yaml +.claude diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 888d42d..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std diff --git a/.soldeerignore b/.soldeerignore new file mode 100644 index 0000000..bc7a62c --- /dev/null +++ b/.soldeerignore @@ -0,0 +1,24 @@ +.DS_Store +.coderabbit.yaml +.gas-snapshot +.git +.github +.gitignore +.gitmodules +.pre-commit-config.yaml +.soldeerignore +.vscode +CLAUDE.md +/audit +/cache +/dependencies +/flake.lock +/flake.nix +/foundry.lock +/foundry.toml +/lib +/out +/remappings.txt +/slither.config.json +/soldeer.lock +/REUSE.toml diff --git a/REUSE.toml b/REUSE.toml index ba81de4..07a7387 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -2,19 +2,20 @@ version = 1 [[annotations]] path = [ - ".gas-snapshot", - ".github/workflows/**/", - ".vscode/**/", - ".gitignore", - ".gitmodules", - "audit/**/", - "README.md", - "flake.lock", - "flake.nix", - "foundry.toml", - "slither.config.json", - "REUSE.toml", - "foundry.lock", + ".gas-snapshot", + ".github/workflows/**/", + ".vscode/**/", + ".gitignore", + "audit/**/", + "README.md", + "flake.lock", + "flake.nix", + "foundry.toml", + "slither.config.json", + "REUSE.toml", + "foundry.lock", + "soldeer.lock", + ".soldeerignore", ] SPDX-FileCopyrightText = "Copyright (c) 2020 Rain Open Source Software Ltd" SPDX-License-Identifier = "LicenseRef-DCL-1.0" diff --git a/foundry.toml b/foundry.toml index e2b6f71..0e3fb87 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,3 +6,11 @@ solc = "0.8.25" optimizer = true optimizer_runs = 100000 evm_version = "cancun" + +libs = ["dependencies"] + +[dependencies] +forge-std = "1.16.1" + +[soldeer] +recursive_deps = false diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index 1801b05..0000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1801b0541f4fda118a10798fd3486bb7051c5dd6 diff --git a/soldeer.lock b/soldeer.lock new file mode 100644 index 0000000..e9184e4 --- /dev/null +++ b/soldeer.lock @@ -0,0 +1,6 @@ +[[dependencies]] +name = "forge-std" +version = "1.16.1" +url = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_16_1_08-05-2026_08:51:16_forge-std-1.16.zip" +checksum = "839b61832925c7152c7b6dffbfa4998d9e606211179bd8f604733124e8a7cb57" +integrity = "60e55d10150354ca4a1e2985c5456c834b92b82ef85ab0e1d92a7786cddbd219" diff --git a/test/Binary.t.sol b/test/Binary.t.sol index 73ffaed..e4938a8 100644 --- a/test/Binary.t.sol +++ b/test/Binary.t.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity =0.8.25; -import {Test} from "forge-std/Test.sol"; +import {Test} from "forge-std-1.16.1/src/Test.sol"; import { B_1, B_11,