From 4cd7c684770ebce1223bda62f748af4364996949 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 11 May 2026 00:34:48 +0400 Subject: [PATCH 1/2] ci: use upstream rainix-rs-test reusable; trim local rainix.yaml cargo test now runs through the new rainlanguage/rainix#150 reusable on ubuntu + macos. The local rainix.yaml shrinks to a single-job workflow for `test-wasm-build`, which is the only float-specific task left (cross-compile to wasm32). Drops the matrix wrapper, the soldeer install + forge build steps (rust crate compiles standalone via committed crates/float/abi/), and the deploy-related env vars (test-wasm-build doesn't deploy). Adds Swatinem/rust-cache@v2 to the test-wasm-build job so it benefits from the same incremental-rebuild cache as the upstream rs-static / rs-test reusables. flake.lock bumped to pull in rainix@5cf5346 (the rs-test reusable + rust-cache in rs-static + drop-fetch-depth changes from the recent rainix sweep). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/rainix-rs-test.yaml | 5 +++ .github/workflows/rainix.yaml | 45 +++------------------------ flake.lock | 6 ++-- 3 files changed, 12 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/rainix-rs-test.yaml diff --git a/.github/workflows/rainix-rs-test.yaml b/.github/workflows/rainix-rs-test.yaml new file mode 100644 index 0000000..ce9b041 --- /dev/null +++ b/.github/workflows/rainix-rs-test.yaml @@ -0,0 +1,5 @@ +name: rainix-rs-test +on: [push] +jobs: + rs-test: + uses: rainlanguage/rainix/.github/workflows/rainix-rs-test.yaml@main diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml index 8e81b23..c69fea4 100644 --- a/.github/workflows/rainix.yaml +++ b/.github/workflows/rainix.yaml @@ -4,23 +4,10 @@ concurrency: group: ${{ github.ref }}-rainix cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - rainix: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - task: ["cargo test"] - include: - # We don't need to do build for wasm32 on multiple platforms - - os: ubuntu-latest - task: test-wasm-build - fail-fast: false - runs-on: ${{ matrix.os }} - env: - DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} + test-wasm-build: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - uses: nixbuild/nix-quick-install-action@v30 with: nix_conf: | @@ -29,32 +16,8 @@ jobs: - 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 }}- gc-max-store-size-linux: 5G - gc-max-store-size-macos: 5G - - run: nix develop -c forge soldeer install - - name: Build solidity artifacts (rust crates load them via alloy::sol!) - run: nix develop -c forge build - - name: Run ${{ matrix.task }} - env: - ETH_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }} - CI_FORK_ARB_RPC_URL: ${{ secrets.RPC_URL_ARBITRUM_FORK || vars.RPC_URL_ARBITRUM_FORK || '' }} - CI_FORK_ETH_RPC_URL: ${{ secrets.RPC_URL_ETHEREUM_FORK || vars.RPC_URL_ETHEREUM_FORK || '' }} - CI_FORK_BASE_RPC_URL: ${{ secrets.RPC_URL_BASE_FORK || vars.RPC_URL_BASE_FORK || '' }} - CI_FORK_FLARE_RPC_URL: ${{ secrets.RPC_URL_FLARE_FORK || vars.RPC_URL_FLARE_FORK || '' }} - ETHERSCAN_API_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }} - DEPLOY_BROADCAST: "" - DEPLOY_VERIFIER: "" - DEPLOY_METABOARD_ADDRESS: ${{ vars.CI_DEPLOY_SEPOLIA_METABOARD_ADDRESS }} - CI_FORK_SEPOLIA_BLOCK_NUMBER: ${{ vars.CI_FORK_SEPOLIA_BLOCK_NUMBER }} - CI_FORK_SEPOLIA_DEPLOYER_ADDRESS: ${{ vars.CI_FORK_SEPOLIA_DEPLOYER_ADDRESS }} - CI_DEPLOY_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }} - CI_DEPLOY_ARBITRUM_RPC_URL: ${{ secrets.CI_DEPLOY_ARBITRUM_RPC_URL || vars.CI_DEPLOY_ARBITRUM_RPC_URL || '' }} - CI_DEPLOY_BASE_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_RPC_URL || vars.CI_DEPLOY_BASE_RPC_URL || '' }} - CI_DEPLOY_BASE_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_SEPOLIA_RPC_URL || vars.CI_DEPLOY_BASE_SEPOLIA_RPC_URL || '' }} - CI_DEPLOY_FLARE_RPC_URL: ${{ secrets.CI_DEPLOY_FLARE_RPC_URL || vars.CI_DEPLOY_FLARE_RPC_URL || '' }} - CI_DEPLOY_POLYGON_RPC_URL: ${{ secrets.CI_DEPLOY_POLYGON_RPC_URL || vars.CI_DEPLOY_POLYGON_RPC_URL || '' }} - run: nix develop -c ${{ matrix.task }} + - uses: Swatinem/rust-cache@v2 + - run: nix develop -c test-wasm-build diff --git a/flake.lock b/flake.lock index b57bdb0..8f66aa7 100644 --- a/flake.lock +++ b/flake.lock @@ -250,11 +250,11 @@ "solc": "solc" }, "locked": { - "lastModified": 1778439832, - "narHash": "sha256-TfG1rzTr55ZloW8FaI/jMKhI2sMKW1UBckgB9wyjq0A=", + "lastModified": 1778445186, + "narHash": "sha256-M+RWf3w1g9Qt+gq8i0FFKaUAgeWOQ6FZgdKQXSqLK/g=", "owner": "rainprotocol", "repo": "rainix", - "rev": "042cf901c333a1e431ebb257fcad5f968be6f2e4", + "rev": "5cf53463b6925c7aba719cb30355989111597e27", "type": "github" }, "original": { From b8b7ba8020e12387d2f96bf92a858f6bb274569e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 11 May 2026 00:39:55 +0400 Subject: [PATCH 2/2] ci: use upstream rainix-rs-wasm reusable Drops the local Rainix CI / test-wasm-build job entirely. Replaced by a one-line wrapper calling rainlanguage/rainix#151's reusable. Removes .github/workflows/rainix.yaml since this was its last remaining job. flake.lock bumped to rainix@edcd45a to pick up the rs-wasm reusable. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/rainix-rs-wasm.yaml | 5 +++++ .github/workflows/rainix.yaml | 23 ----------------------- flake.lock | 6 +++--- 3 files changed, 8 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/rainix-rs-wasm.yaml delete mode 100644 .github/workflows/rainix.yaml diff --git a/.github/workflows/rainix-rs-wasm.yaml b/.github/workflows/rainix-rs-wasm.yaml new file mode 100644 index 0000000..587b08d --- /dev/null +++ b/.github/workflows/rainix-rs-wasm.yaml @@ -0,0 +1,5 @@ +name: rainix-rs-wasm +on: [push] +jobs: + rs-wasm: + uses: rainlanguage/rainix/.github/workflows/rainix-rs-wasm.yaml@main diff --git a/.github/workflows/rainix.yaml b/.github/workflows/rainix.yaml deleted file mode 100644 index c69fea4..0000000 --- a/.github/workflows/rainix.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Rainix CI -on: [push] -concurrency: - group: ${{ github.ref }}-rainix - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} -jobs: - test-wasm-build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - 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: - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - restore-prefixes-first-match: nix-${{ runner.os }}- - gc-max-store-size-linux: 5G - - uses: Swatinem/rust-cache@v2 - - run: nix develop -c test-wasm-build diff --git a/flake.lock b/flake.lock index 8f66aa7..dba1b86 100644 --- a/flake.lock +++ b/flake.lock @@ -250,11 +250,11 @@ "solc": "solc" }, "locked": { - "lastModified": 1778445186, - "narHash": "sha256-M+RWf3w1g9Qt+gq8i0FFKaUAgeWOQ6FZgdKQXSqLK/g=", + "lastModified": 1778445525, + "narHash": "sha256-1oNxd9cKgHuKWj9+NUxWCYqY6jtKkk0gWXiPi2dhd7A=", "owner": "rainprotocol", "repo": "rainix", - "rev": "5cf53463b6925c7aba719cb30355989111597e27", + "rev": "edcd45a05ce301bcf2c04a1f8256a79e091f10ad", "type": "github" }, "original": {