Skip to content

Commit da90cb8

Browse files
author
Modelcode-ai
committed
Initial commit: charcoal-cli benchmark source code
0 parents  commit da90cb8

378 files changed

Lines changed: 28843 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**Context:**
2+
3+
**Changes In This Pull Request:**
4+
5+
**Test Plan:**

.github/linters/.jscpd.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"threshold": 100
3+
}

.github/workflows/pull_request.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Pull request CI
2+
3+
on:
4+
pull_request:
5+
types: [
6+
# Default pull_request trigger types.
7+
opened,
8+
synchronize,
9+
reopened,
10+
]
11+
12+
jobs:
13+
lint_and_fast_tests:
14+
name: 'Run CLI tests'
15+
runs-on: ubuntu-latest
16+
steps:
17+
# Basic setup
18+
- uses: actions/checkout@v2
19+
with:
20+
clean: 'false'
21+
fetch-depth: 0
22+
- uses: actions/setup-node@v3
23+
- name: Install
24+
run: yarn install --immutable
25+
- name: Lint
26+
run: yarn workspace @danerwilliams/charcoal run lint
27+
- name: Build
28+
run: yarn turbo run build
29+
- name: Setup git
30+
run: git config --global user.email "test@gmail.com" && git config --global user.name "test"
31+
- name: Git Version
32+
run: git --version
33+
- name: Test
34+
run: yarn workspace @danerwilliams/charcoal run test-ci
35+
36+
superlinter:
37+
name: 'Run superlinter'
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout Code
41+
uses: actions/checkout@v2
42+
with:
43+
# Full git history is needed to get a proper list of changed files within `super-linter`
44+
fetch-depth: 0
45+
46+
- name: Lint Code Base
47+
uses: github/super-linter@v4
48+
continue-on-error: true
49+
env:
50+
VALIDATE_ALL_CODEBASE: false
51+
DEFAULT_BRANCH: main
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
TYPESCRIPT_DEFAULT_STYLE: prettier

.github/workflows/push.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Push CI
2+
permissions:
3+
contents: write
4+
on:
5+
push:
6+
branches: [main]
7+
tags:
8+
- "v*"
9+
10+
jobs:
11+
lint_and_fast_tests:
12+
name: "Run CLI tests"
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [14.x, 15.x, 16.x, 17.x, 18.x, current]
17+
steps:
18+
# Basic setup
19+
- uses: actions/checkout@v3
20+
with:
21+
clean: "false"
22+
fetch-depth: 0
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- name: Install
28+
run: yarn install --immutable
29+
- name: Build
30+
run: yarn turbo run build
31+
- name: Setup git
32+
run: git config --global user.email "test@gmail.com" && git config --global user.name "test"
33+
- name: Git Version
34+
run: git --version
35+
- name: Test
36+
run: yarn workspace @danerwilliams/charcoal run test
37+
38+
superlinter:
39+
name: "Run superlinter"
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout Code
43+
uses: actions/checkout@v3
44+
with:
45+
# Full git history is needed to get a proper list of changed files within `super-linter`
46+
fetch-depth: 0
47+
48+
- name: Lint Code Base
49+
uses: github/super-linter@v4
50+
continue-on-error: true
51+
env:
52+
VALIDATE_ALL_CODEBASE: false
53+
DEFAULT_BRANCH: main
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
TYPESCRIPT_DEFAULT_STYLE: prettier
56+
57+
create-binaries:
58+
name: Upload executable binaries
59+
strategy:
60+
matrix:
61+
os: [macos, ubuntu]
62+
include:
63+
- os: macos
64+
build: yarn workspace @danerwilliams/charcoal run build-pkg -t node18-macos -o "gt-macos-x86-${{ github.sha }}"
65+
artifact-name: gt-macos-x86-${{ github.sha }}
66+
artifact-path: apps/cli/gt-macos-x86-${{ github.sha }}
67+
- os: ubuntu
68+
build: yarn workspace @danerwilliams/charcoal run build-pkg -t node18-linux -o "gt-linux-${{ github.sha }}"
69+
artifact-name: gt-linux-${{ github.sha }}
70+
artifact-path: apps/cli/gt-linux-${{ github.sha }}
71+
runs-on: ${{ matrix.os }}-latest
72+
steps:
73+
- name: Checkout code
74+
uses: actions/checkout@v3
75+
- name: Setup node
76+
uses: actions/setup-node@v3
77+
with:
78+
node-version: 16
79+
- name: Install
80+
run: yarn install --immutable
81+
- name: Build
82+
run: yarn turbo run build
83+
- name: Build binary
84+
run: ${{ matrix.build }}
85+
- name: Upload binary
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: ${{ matrix.artifact-name }}
89+
path: ${{ matrix.artifact-path }}
90+
91+
release:
92+
name: Release version
93+
if: startsWith(github.ref, 'refs/tags/v')
94+
needs: [lint_and_fast_tests, create-binaries]
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Download mac x86
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: gt-macos-x86-${{ github.sha }}
101+
- name: Download linux
102+
uses: actions/download-artifact@v4
103+
with:
104+
name: gt-linux-${{ github.sha }}
105+
- name: Rename files
106+
run: |
107+
mv gt-macos-x86-${{ github.sha }} gt-macos-x86;
108+
mv gt-linux-${{ github.sha }} gt-linux
109+
- name: Release
110+
uses: ncipollo/release-action@v1
111+
with:
112+
artifacts: "gt-macos-x86,gt-linux"
113+
draft: false
114+
prerelease: true
115+
allowUpdates: true

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_STORE
2+
xcuserdata/
3+
**/node_modules
4+
.yarn/*
5+
.turbo/*
6+
turbo-build.log
7+
!.yarn/releases
8+
!.yarn/plugins
9+
!.yarn/sdks
10+
!.yarn/versions
11+
.pnp.*
12+
dist/
13+
.eslintcache
14+
.graphite_repo_config
15+
.idea/*
16+
.nyc_output/
17+
coverage/
18+
pkg/
19+
20+
# we use yarn, not npm
21+
package-lock.json

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.17.1

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
dist
3+
node_modules

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 546 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-typescript.cjs

Lines changed: 9 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.2.1.cjs

Lines changed: 786 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)