Skip to content

Commit 95749bb

Browse files
leogdioncodecov-ai[bot]
andauthored
V0.0.1 (#22)
* adding initial working test * fixing tests * adding new code generation * working sample from code base * added function * adding parser code * fixing ast parser * adding more examples * Adding comments and literals * Adding Dev Containers (#12) * renaming Package * Adding Continuous Integration (#13) * reorganized repo (#15) * Adding Documentation (#19) * Migrated from XCTest to Swift Testing (#16) * Migrated from XCTest to Swift Testing * Add Tests for PR#16 (#17) --------- Co-authored-by: codecov-ai[bot] <156709835+codecov-ai[bot]@users.noreply.github.com> * Adding Periphery and Fixing Linting Issues (#20) * adding periphery and fixing issues * disable periphery for CI * Update README.md (#23) --------- Co-authored-by: codecov-ai[bot] <156709835+codecov-ai[bot]@users.noreply.github.com>
1 parent 07d90e6 commit 95749bb

120 files changed

Lines changed: 5542 additions & 2254 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.

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "Swift",
3+
"image": "swiftlang/swift:nightly-6.2-noble",
4+
"features": {
5+
"ghcr.io/devcontainers/features/common-utils:2": {
6+
"installZsh": "false",
7+
"username": "vscode",
8+
"upgradePackages": "false"
9+
},
10+
"ghcr.io/devcontainers/features/git:1": {
11+
"version": "os-provided",
12+
"ppa": "false"
13+
}
14+
},
15+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
16+
"runArgs": [
17+
"--cap-add=SYS_PTRACE",
18+
"--security-opt",
19+
"seccomp=unconfined"
20+
],
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
// Configure properties specific to VS Code.
24+
"vscode": {
25+
// Set *default* container specific settings.json values on container create.
26+
"settings": {
27+
"lldb.library": "/usr/lib/liblldb.so"
28+
},
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"sswg.swift-lang"
32+
]
33+
}
34+
},
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
38+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39+
"remoteUser": "root"
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "Swift",
3+
"image": "swift:6.1",
4+
"features": {
5+
"ghcr.io/devcontainers/features/common-utils:2": {
6+
"installZsh": "false",
7+
"username": "vscode",
8+
"upgradePackages": "false"
9+
},
10+
"ghcr.io/devcontainers/features/git:1": {
11+
"version": "os-provided",
12+
"ppa": "false"
13+
}
14+
},
15+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
16+
"runArgs": [
17+
"--cap-add=SYS_PTRACE",
18+
"--security-opt",
19+
"seccomp=unconfined"
20+
],
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
// Configure properties specific to VS Code.
24+
"vscode": {
25+
// Set *default* container specific settings.json values on container create.
26+
"settings": {
27+
"lldb.library": "/usr/lib/liblldb.so"
28+
},
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"sswg.swift-lang"
32+
]
33+
}
34+
},
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
38+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39+
"remoteUser": "root"
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "Swift",
3+
"image": "swiftlang/swift:nightly-6.2-noble",
4+
"features": {
5+
"ghcr.io/devcontainers/features/common-utils:2": {
6+
"installZsh": "false",
7+
"username": "vscode",
8+
"upgradePackages": "false"
9+
},
10+
"ghcr.io/devcontainers/features/git:1": {
11+
"version": "os-provided",
12+
"ppa": "false"
13+
}
14+
},
15+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
16+
"runArgs": [
17+
"--cap-add=SYS_PTRACE",
18+
"--security-opt",
19+
"seccomp=unconfined"
20+
],
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
// Configure properties specific to VS Code.
24+
"vscode": {
25+
// Set *default* container specific settings.json values on container create.
26+
"settings": {
27+
"lldb.library": "/usr/lib/liblldb.so"
28+
},
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"sswg.swift-lang"
32+
]
33+
}
34+
},
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
38+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39+
"remoteUser": "root"
40+
}

.github/workflows/SyntaxKit.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: SyntaxKit
2+
on:
3+
push:
4+
branches-ignore:
5+
- '*WIP'
6+
env:
7+
PACKAGE_NAME: SyntaxKit
8+
jobs:
9+
build-ubuntu:
10+
name: Build on Ubuntu
11+
runs-on: ubuntu-latest
12+
container: swiftlang/swift:nightly-${{ matrix.swift-version }}-${{ matrix.os }}
13+
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
14+
strategy:
15+
matrix:
16+
os: ["noble", "jammy"]
17+
swift-version: ["6.1", "6.2"]
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: brightdigit/swift-build@v1.1.1
21+
- uses: sersoft-gmbh/swift-coverage-action@v4
22+
id: coverage-files
23+
with:
24+
fail-on-empty-output: true
25+
- name: Upload coverage to Codecov
26+
uses: codecov/codecov-action@v4
27+
with:
28+
fail_ci_if_error: true
29+
flags: swift-${{ matrix.swift-version }},ubuntu
30+
verbose: true
31+
token: ${{ secrets.CODECOV_TOKEN }}
32+
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
33+
build-macos:
34+
name: Build on macOS
35+
env:
36+
PACKAGE_NAME: SyntaxKit
37+
runs-on: ${{ matrix.runs-on }}
38+
if: "!contains(github.event.head_commit.message, 'ci skip')"
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
include:
43+
# SPM Build Matrix
44+
- runs-on: macos-15
45+
xcode: "/Applications/Xcode_16.4.app"
46+
47+
# macOS Build Matrix
48+
- type: macos
49+
runs-on: macos-15
50+
xcode: "/Applications/Xcode_16.4.app"
51+
52+
# iOS Build Matrix
53+
- type: ios
54+
runs-on: macos-15
55+
xcode: "/Applications/Xcode_16.4.app"
56+
deviceName: "iPhone 16 Pro"
57+
osVersion: "18.5"
58+
59+
# watchOS Build Matrix
60+
- type: watchos
61+
runs-on: macos-15
62+
xcode: "/Applications/Xcode_16.4.app"
63+
deviceName: "Apple Watch Ultra 2 (49mm)"
64+
osVersion: "11.5"
65+
66+
# tvOS Build Matrix
67+
- type: tvos
68+
runs-on: macos-15
69+
xcode: "/Applications/Xcode_16.4.app"
70+
deviceName: "Apple TV"
71+
osVersion: "18.5"
72+
73+
# visionOS Build Matrix
74+
- type: visionos
75+
runs-on: macos-15
76+
xcode: "/Applications/Xcode_16.4.app"
77+
deviceName: "Apple Vision Pro"
78+
osVersion: "2.5"
79+
80+
steps:
81+
- uses: actions/checkout@v4
82+
83+
- name: Build and Test
84+
uses: brightdigit/swift-build@v1.1.1
85+
with:
86+
scheme: ${{ env.PACKAGE_NAME }}-Package
87+
type: ${{ matrix.type }}
88+
xcode: ${{ matrix.xcode }}
89+
deviceName: ${{ matrix.deviceName }}
90+
osVersion: ${{ matrix.osVersion }}
91+
92+
# Common Coverage Steps
93+
- name: Process Coverage
94+
uses: sersoft-gmbh/swift-coverage-action@v4
95+
96+
- name: Upload Coverage
97+
uses: codecov/codecov-action@v4
98+
with:
99+
token: ${{ secrets.CODECOV_TOKEN }}
100+
flags: ${{ matrix.type && format('{0}{1}', matrix.type, matrix.osVersion) || 'spm' }}
101+
102+
lint:
103+
name: Linting
104+
if: "!contains(github.event.head_commit.message, 'ci skip')"
105+
runs-on: ubuntu-latest
106+
needs: [build-ubuntu, build-macos]
107+
env:
108+
MINT_PATH: .mint/lib
109+
MINT_LINK_PATH: .mint/bin
110+
steps:
111+
- uses: actions/checkout@v4
112+
- name: Cache mint
113+
id: cache-mint
114+
uses: actions/cache@v4
115+
env:
116+
cache-name: cache
117+
with:
118+
path: |
119+
.mint
120+
Mint
121+
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
122+
restore-keys: |
123+
${{ runner.os }}-mint-
124+
- name: Install mint
125+
if: steps.cache-mint.outputs.cache-hit != 'true'
126+
run: |
127+
git clone https://github.com/yonaskolb/Mint.git
128+
cd Mint
129+
swift run mint install yonaskolb/mint
130+
- name: Lint
131+
run: ./Scripts/lint.sh

0 commit comments

Comments
 (0)