From 2415d7abc14569ac96b959a860b783044ec80509 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Thu, 23 Jan 2025 18:39:31 +0100 Subject: [PATCH 1/3] ci: setup Node.js 23 forward compatibility testing Since we're testing not the compiler, but Node.js 23 compatibility with building and running the compiler, I didn't add the 23 to the `node-version` matrix on top and instead used `tact-template` to keep the change in CI time minimal --- .github/workflows/tact.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/tact.yml b/.github/workflows/tact.yml index df1e22d7b..d4f23fe08 100644 --- a/.github/workflows/tact.yml +++ b/.github/workflows/tact.yml @@ -45,6 +45,34 @@ jobs: yarn cleanall yarn config delete ignore-engines + - name: Setup Node.js 23 for forward compat tests + uses: actions/setup-node@v4 + with: + node-version: 23 + # without caching + + - name: Forward compat tests + run: | + # Install dependencies, gen and build the compiler + yarn install + yarn clean + yarn gen + yarn build + + # Linking and tact-template checks + yarn link + git clone https://github.com/tact-lang/tact-template.git tact-template-23 + cd tact-template + yarn install + yarn link @tact-lang/compiler + yarn build + yarn test + cd .. + yarn unlink + + # Clean-up + yarn cleanall + - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: From 6d79de554c3b93d22753c0c3e33c5c779e0e860c Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Thu, 23 Jan 2025 19:10:14 +0100 Subject: [PATCH 2/3] address suggestions from the code review --- .github/workflows/tact.yml | 62 +++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/workflows/tact.yml b/.github/workflows/tact.yml index d4f23fe08..52bc642dc 100644 --- a/.github/workflows/tact.yml +++ b/.github/workflows/tact.yml @@ -9,26 +9,24 @@ on: workflow_dispatch: jobs: - test: + backwards-compat: strategy: fail-fast: false matrix: - node-version: [22] + node-version: [18] os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Node.js 18 for backwards compat tests + - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version: 18 + node-version: ${{ matrix.node-version }} # without caching - - name: Backwards compat tests + - name: Backwards compatibility tests run: | # Temporarily ignore engines yarn config set ignore-engines true @@ -45,34 +43,46 @@ jobs: yarn cleanall yarn config delete ignore-engines - - name: Setup Node.js 23 for forward compat tests + forward-compat: + strategy: + fail-fast: false + matrix: + node-version: [23] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version: 23 + node-version: ${{ matrix.node-version }} # without caching - - name: Forward compat tests + - name: Forward compatibility tests run: | - # Install dependencies, gen and build the compiler - yarn install - yarn clean - yarn gen - yarn build - - # Linking and tact-template checks - yarn link - git clone https://github.com/tact-lang/tact-template.git tact-template-23 - cd tact-template + # Install dependencies and perform some steps of the build pipeline yarn install - yarn link @tact-lang/compiler + yarn gen:grammar + yarn gen:stdlib + yarn gen:func-js + # ...skipping contract generation... yarn build - yarn test - cd .. - yarn unlink - # Clean-up yarn cleanall + test: + strategy: + fail-fast: false + matrix: + node-version: [22] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -157,9 +167,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] package-manager: [npm, yarn, pnpm, bun] # follow-up ifs are for ensuring clean state at all times - runs-on: ${{ matrix.os }} - steps: - name: Checkout repository uses: actions/checkout@v3 From 90c766211b5b44c271d7dae5ff6f65756cdb12b7 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Thu, 23 Jan 2025 19:15:06 +0100 Subject: [PATCH 3/3] whoopsie --- .github/workflows/tact.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tact.yml b/.github/workflows/tact.yml index 52bc642dc..b4901ef27 100644 --- a/.github/workflows/tact.yml +++ b/.github/workflows/tact.yml @@ -62,13 +62,12 @@ jobs: - name: Forward compatibility tests run: | - # Install dependencies and perform some steps of the build pipeline + # Install dependencies and perform some steps of the build pipeline, + # skipping the contract generation and the final `yarn build` step yarn install yarn gen:grammar yarn gen:stdlib yarn gen:func-js - # ...skipping contract generation... - yarn build # Clean-up yarn cleanall