Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version #40

Merged
merged 20 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"reporter": ["html", "text"],
"exclude": [
"**/node_modules/**",
"**/funcfiftlib.js",
"**/compileFift.ts",
"**/errors.ts",
"**/test/**",
"**/*.d.ts"
]
}
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,ts}]
max_line_length = 100

[*.{yml,yaml}]
indent_size = 2
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf
funcfiftlib.js linguist-vendored
40 changes: 40 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Linter & Formatter

on:
pull_request:
branches:
- main
push:
branches:
- main

env:
HUSKY: 0

jobs:
linter:
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "yarn"

- name: Install dependencies
run: yarn install --immutable --check-cache --check-resolutions

- name: Check yarn dedupe
run: yarn dedupe --check

- name: Run prettier
run: yarn run fmt:check

- name: Run eslint
run: yarn run lint
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests

on:
pull_request:
branches:
- main
push:
branches:
- main

env:
HUSKY: 0

jobs:
tests:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Enable Corepack
if: matrix.os == 'windows-latest'
run: corepack enable --install-directory 'C:\npm\prefix'

- name: Enable Corepack
if: matrix.os != 'windows-latest'
run: corepack enable

- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "yarn"

- name: Install dependencies
env:
YARN_ENABLE_HARDENED_MODE: false
run: yarn install --immutable

- name: Build
run: yarn build

- name: Run Tests
run: yarn test
129 changes: 65 additions & 64 deletions .github/workflows/ton-opcode.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,80 @@
name: ton-opcode CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
test:
strategy:
fail-fast: false
matrix:
node-version: [22.x]
os: [ubuntu-latest, windows-latest, macos-latest]
test:
if: ${{ false }} # Until we fix compiler
strategy:
fail-fast: false
matrix:
node-version: [22.x]
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"

- name: Install dependencies
- name: Install dependencies

run: |
corepack enable
yarn install
run: |
corepack enable
yarn install

- name: Build and Test
run: |
yarn clean
yarn gen
yarn build
yarn test
- name: Build and Test
run: |
yarn clean
yarn gen
yarn build
yarn test

- name: Link ton-opcode
run: |
yarn link
- name: Link ton-opcode
run: |
yarn link

- name: Test compatibility with Tact
run: |
git clone https://github.com/tact-lang/tact.git
cd tact
yarn install
yarn link @tact-lang/opcode
yarn clean
yarn gen
yarn build
yarn test
npm install -g ./
tact --version
- name: Test compatibility with Tact
run: |
git clone https://github.com/tact-lang/tact.git
cd tact
yarn install
yarn link @tact-lang/opcode
yarn clean
yarn gen
yarn build
yarn test
npm install -g ./
tact --version

- name: Test compatibility with tact-template
run: |
git clone https://github.com/tact-lang/tact-template.git
cd tact-template
yarn install
yarn link @tact-lang/opcode
yarn build
yarn test
yarn tact --version
- name: Test compatibility with tact-template
run: |
git clone https://github.com/tact-lang/tact-template.git
cd tact-template
yarn install
yarn link @tact-lang/opcode
yarn build
yarn test
yarn tact --version

- name: Test compatibility with Blueprint
run: |
yarn create ton -- test-project --type tact-counter --contractName Counter
cd test-project
yarn link @tact-lang/opcode
yarn build
yarn test
yarn tact --version
- name: Test compatibility with Blueprint
run: |
yarn create ton -- test-project --type tact-counter --contractName Counter
cd test-project
yarn link @tact-lang/opcode
yarn build
yarn test
yarn tact --version
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
node_modules
dist
.DS_Store
.idea
dist/
*.wasm

# yarn
yarn-error.log
.yarn/

# eslint
.eslintcache
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo "Running pre-commit tasks" >&2
yarn run fmt:check || (echo 'Please run `yarn run fmt` to autofix.' >&2 && exit 1)
yarn run lint || (echo 'Please run `yarn run lint` to show the errors.' >&2 && exit 1)
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading