From ea28264285fbf1726e11addbf584682e048503d2 Mon Sep 17 00:00:00 2001 From: BowTiedRadone Date: Fri, 27 Dec 2024 14:45:10 +0200 Subject: [PATCH 1/7] Setup cross-platform CI --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..238572e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: Cross-Platform CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ${{ matrix.os }} + timeout-minutes: 3 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + node-version: [20.18.0] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Run example tests + run: | + ./rv example counter test + ./rv example counter invariant + ./rv example cargo test + ./rv example cargo invariant + ./rv example reverse test + ./rv example slice test From 594215baf04b40e526db3f893c7fddd4fc0eacb8 Mon Sep 17 00:00:00 2001 From: BowTiedRadone Date: Fri, 27 Dec 2024 19:22:28 +0200 Subject: [PATCH 2/7] Run the CI using 18, 20, and 22 `Node.JS` versions --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 238572e..bd6f937 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,16 +16,16 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - node-version: [20.18.0] + node: [22, 20, 18] steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ matrix.node }} - name: Install dependencies run: npm ci From 0999ebcf64f7329525456bd13d71af63e2434b36 Mon Sep 17 00:00:00 2001 From: BowTiedRadone Date: Fri, 27 Dec 2024 19:23:29 +0200 Subject: [PATCH 3/7] Update `Node.JS` requirement info in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fd4019..603bfce 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Rendezvous `rv` is a Clarity fuzzer designed to cut through your smart contract' ### Prerequisites -- **Node.js**: Requires LTS version 20.18.0. Other versions may work, but they are untested. +- **Node.js**: Supported versions include 18, 20, and 22. Other versions may work, but they are untested. ### Inspiration From 4b0fd0770ebf80d36354a8f612dd3a3e18d63c11 Mon Sep 17 00:00:00 2001 From: BowTiedRadone Date: Sat, 28 Dec 2024 12:16:12 +0200 Subject: [PATCH 4/7] Temporarily disable CI on Windows This commit removes `windows-latest` from the `os` matrix. Until a fix for https://github.com/hirosystems/clarinet/issues/1634, `npm test` will fail on Windows. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd6f937..6343b62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] node: [22, 20, 18] steps: From 28b5446a50a11fdc34c37bcb81ff05d32be2c385 Mon Sep 17 00:00:00 2001 From: BowTiedRadone <92028479+BowTiedRadone@users.noreply.github.com> Date: Sat, 28 Dec 2024 12:38:58 +0200 Subject: [PATCH 5/7] Split `tests` and `example tests` into distinct jobs This commit separates the jobs for running regular tests and example tests. Example tests are now included for Windows, increasing coverage until https://github.com/hirosystems/clarinet/issues/1634 is resolved. --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6343b62..16b9d62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: - master jobs: - test: + tests: runs-on: ${{ matrix.os }} timeout-minutes: 3 strategy: @@ -33,11 +33,34 @@ jobs: - name: Run tests run: npm test + example-tests: + runs-on: ${{ matrix.os }} + timeout-minutes: 3 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + node: [22, 20, 18] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + - name: Install dependencies + run: npm ci + - name: Run example tests + shell: bash run: | - ./rv example counter test - ./rv example counter invariant - ./rv example cargo test - ./rv example cargo invariant - ./rv example reverse test - ./rv example slice test + cd example + ../rv . counter test + ../rv . counter invariant + ../rv . cargo test + ../rv . cargo invariant + ../rv . reverse test + ../rv . slice test From f45f04f33246b5ca1eb93a25d7a842f0cb0f980a Mon Sep 17 00:00:00 2001 From: BowTiedRadone Date: Sat, 28 Dec 2024 12:56:03 +0200 Subject: [PATCH 6/7] Normalize line endings for files --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7e7475a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.clar text eol=lf From 14f42a50e21fc2598d7552370211ca1aeaaa6c29 Mon Sep 17 00:00:00 2001 From: BowTiedRadone <92028479+BowTiedRadone@users.noreply.github.com> Date: Sat, 28 Dec 2024 15:19:15 +0200 Subject: [PATCH 7/7] Refine CI namings This commit renames the CI and the examples job. Co-authored-by: Nikos Baxevanis --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16b9d62..bf5e9a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Cross-Platform CI +name: Sanity checks on: push: @@ -33,7 +33,7 @@ jobs: - name: Run tests run: npm test - example-tests: + examples: runs-on: ${{ matrix.os }} timeout-minutes: 3 strategy: @@ -54,7 +54,7 @@ jobs: - name: Install dependencies run: npm ci - - name: Run example tests + - name: Run examples shell: bash run: | cd example