Skip to content

Commit 3fc21a7

Browse files
Metacraft Labsalehander92
authored andcommitted
This is the initial open-source release of CodeTracer.
The following individuals, as current or former employees of Metacraft Labs, have contributed code for this release: * Alexander Ivanov * Nedislav Miladinov * Viktor Velichkov * Franz Fischbach * Dimo Chanev * Pavel Penev * Petar Atanasov * Stanislav Vasilev * Petar Kirov The graphic design is mostly authored by Nikolay Fenixov, with past contributions from Blaga Vladinova. Metacraft Labs was founded by Zahary Karadjov in 2017 and has been under his direction ever since.
0 parents  commit 3fc21a7

File tree

848 files changed

+197139
-0
lines changed

Some content is hidden

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

848 files changed

+197139
-0
lines changed

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": ["env"],
3+
"plugins": ["transform-async-to-generator"],
4+
"ignore": "/(node_modules|bower_components/"
5+
}

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig file: http://EditorConfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 2
11+
max_line_length = 80
12+
13+
[*.{d,h,hpp,c,cpp,cxx,cs,hs,java,kt,py,rs,sol}]
14+
indent_size = 4
15+
16+
[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
17+
indent_style = tab
18+
indent_size = 4

.envrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# shellcheck shell=bash
2+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
3+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
4+
fi
5+
6+
dotenv_if_exists
7+
8+
# watch_file "$(find ./nix -name "*.nix" -type f)"
9+
10+
OS_AND_SYSTEM=$(uname -a)
11+
12+
if [[ "${NO_NIX:-}" == "1" || $OS_AND_SYSTEM == "Darwin"* ]]; then
13+
source non-nix-build/env.sh
14+
else
15+
use flake
16+
fi

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* binary linguist-generated

.github/workflows/codetracer.yml

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
name: Codetracer CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- '*.*.*'
8+
pull_request:
9+
10+
jobs:
11+
lint-bash:
12+
runs-on: [self-hosted, nixos]
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
19+
- name: Install Nix
20+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
21+
with:
22+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
23+
cachix-cache: ${{ vars.CACHIX_CACHE }}
24+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
25+
substituters: ${{ vars.SUBSTITUTERS }}
26+
27+
- run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/bash.sh"
28+
29+
30+
lint-nim:
31+
runs-on: [self-hosted, nixos]
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: recursive
37+
38+
- name: Install Nix
39+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
40+
with:
41+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
42+
cachix-cache: ${{ vars.CACHIX_CACHE }}
43+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
44+
substituters: ${{ vars.SUBSTITUTERS }}
45+
46+
- run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/nim.sh"
47+
48+
49+
lint-nix:
50+
runs-on: [self-hosted, nixos]
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
with:
55+
submodules: recursive
56+
57+
- name: Install Nix
58+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
59+
with:
60+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
61+
cachix-cache: ${{ vars.CACHIX_CACHE }}
62+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
63+
substituters: ${{ vars.SUBSTITUTERS }}
64+
65+
- run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/nix.sh"
66+
67+
68+
lint-rust:
69+
runs-on: [self-hosted, nixos]
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
with:
74+
submodules: recursive
75+
76+
- name: Install Nix
77+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
78+
with:
79+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
80+
cachix-cache: ${{ vars.CACHIX_CACHE }}
81+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
82+
substituters: ${{ vars.SUBSTITUTERS }}
83+
84+
- run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/rust.sh"
85+
86+
87+
lint-ui-tests:
88+
runs-on: [self-hosted, nixos]
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v4
92+
with:
93+
submodules: recursive
94+
95+
- name: Install Nix
96+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
97+
with:
98+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
99+
cachix-cache: ${{ vars.CACHIX_CACHE }}
100+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
101+
substituters: ${{ vars.SUBSTITUTERS }}
102+
103+
- run: "nix develop .#devShells.x86_64-linux.default -c ./ci/lint/ui-tests.sh"
104+
105+
106+
dev-build:
107+
runs-on: [self-hosted, nixos]
108+
needs:
109+
- lint-bash
110+
- lint-nim
111+
- lint-nix
112+
- lint-rust
113+
- lint-ui-tests
114+
steps:
115+
- name: Checkout
116+
uses: actions/checkout@v4
117+
with:
118+
submodules: recursive
119+
120+
- name: Install Nix
121+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
122+
with:
123+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
124+
cachix-cache: ${{ vars.CACHIX_CACHE }}
125+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
126+
substituters: ${{ vars.SUBSTITUTERS }}
127+
128+
- run: "nix develop .#devShells.x86_64-linux.default --command ./ci/build/dev.sh"
129+
130+
131+
nix-build:
132+
runs-on: [self-hosted, nixos]
133+
needs:
134+
- lint-bash
135+
- lint-nim
136+
- lint-nix
137+
- lint-rust
138+
- lint-ui-tests
139+
steps:
140+
- name: Checkout
141+
uses: actions/checkout@v4
142+
with:
143+
submodules: recursive
144+
145+
- name: Install Nix
146+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
147+
with:
148+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
149+
cachix-cache: ${{ vars.CACHIX_CACHE }}
150+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
151+
substituters: ${{ vars.SUBSTITUTERS }}
152+
153+
- run: "nix develop .#devShells.x86_64-linux.default --command ./ci/build/nix.sh"
154+
155+
156+
appimage-build:
157+
runs-on: [self-hosted, nixos]
158+
needs:
159+
- lint-bash
160+
- lint-nim
161+
- lint-nix
162+
- lint-rust
163+
- lint-ui-tests
164+
steps:
165+
- name: Checkout
166+
uses: actions/checkout@v4
167+
with:
168+
submodules: recursive
169+
170+
- name: Install Nix
171+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
172+
with:
173+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
174+
cachix-cache: ${{ vars.CACHIX_CACHE }}
175+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
176+
substituters: ${{ vars.SUBSTITUTERS }}
177+
- name: Build
178+
run: "nix develop .#devShells.x86_64-linux.default --command ./ci/build/appimage.sh"
179+
180+
- name: Upload artifact
181+
if: startsWith(github.ref, 'refs/tags/')
182+
env:
183+
AWS_ACCESS_KEY_ID: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY_ID }}
184+
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_CODETRACER_BUCKET_ACCESS_KEY }}
185+
run: |
186+
nix develop .#devShells.x86_64-linux.default --command aws --endpoint-url=${{ secrets.R2_CODETRACER_BUCKET_S3_ENDPOINT }} s3 cp CodeTracer.AppImage s3://${{ vars.R2_CODETRACER_BUCKET_NAME }}/CodeTracer-${{ github.ref_name }}-amd64.AppImage
187+
188+
189+
test-rust:
190+
runs-on: [self-hosted, nixos]
191+
needs:
192+
- dev-build
193+
- nix-build
194+
- appimage-build
195+
steps:
196+
- name: Checkout
197+
uses: actions/checkout@v4
198+
with:
199+
submodules: recursive
200+
201+
- name: Install Nix
202+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
203+
with:
204+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
205+
cachix-cache: ${{ vars.CACHIX_CACHE }}
206+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
207+
substituters: ${{ vars.SUBSTITUTERS }}
208+
209+
- run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/rust.sh"
210+
211+
212+
test-ui-tests:
213+
runs-on: [self-hosted, nixos]
214+
needs:
215+
- dev-build
216+
- nix-build
217+
- appimage-build
218+
steps:
219+
- name: Checkout
220+
uses: actions/checkout@v4
221+
with:
222+
submodules: recursive
223+
224+
- name: Install Nix
225+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
226+
with:
227+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
228+
cachix-cache: ${{ vars.CACHIX_CACHE }}
229+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
230+
substituters: ${{ vars.SUBSTITUTERS }}
231+
232+
- run: "nix develop .#devShells.x86_64-linux.default --command ./ci/test/ui-tests.sh"
233+
234+
235+
push-to-cachix:
236+
runs-on: [self-hosted, nixos]
237+
needs:
238+
- test-rust
239+
- test-ui-tests
240+
if: github.ref == 'refs/heads/main'
241+
steps:
242+
- name: Checkout
243+
uses: actions/checkout@v4
244+
with:
245+
submodules: recursive
246+
247+
- name: Install Nix
248+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
249+
with:
250+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
251+
cachix-cache: ${{ vars.CACHIX_CACHE }}
252+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
253+
substituters: ${{ vars.SUBSTITUTERS }}
254+
255+
- run: "nix develop .#devShells.x86_64-linux.default --command ./ci/deploy/build-nix-and-push-to-cachix.sh"
256+
257+
258+
build-and-deploy-docs:
259+
runs-on: [self-hosted, nixos]
260+
needs: [push-to-cachix]
261+
if: github.ref == 'refs/heads/main'
262+
steps:
263+
- name: Checkout
264+
uses: actions/checkout@v4
265+
with:
266+
submodules: recursive
267+
268+
- name: Install Nix
269+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
270+
with:
271+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
272+
cachix-cache: ${{ vars.CACHIX_CACHE }}
273+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
274+
substituters: ${{ vars.SUBSTITUTERS }}
275+
276+
- run: "nix develop .#devShells.x86_64-linux.default --command ./ci/deploy/docs.sh"

0 commit comments

Comments
 (0)