-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f9377f
commit 0629188
Showing
15 changed files
with
127 additions
and
141 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM swift:5.9-jammy | ||
# FROM swiftlang/swift:nightly-main-focal | ||
|
||
# Install test dependencies | ||
RUN DEBIAN_FRONTEND=noninteractive \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
xxd | ||
|
||
# Install swift-format | ||
RUN \ | ||
git clone https://github.com/apple/swift-format.git -b 509.0.0 /opt/swift-format && \ | ||
cd /opt/swift-format && \ | ||
# Build debug since release takes forever to build and there isn't a meaningful runtime performance delta | ||
swift build -c debug && \ | ||
cp .build/debug/swift-format /usr/bin/swift-format && \ | ||
rm -rf /opt/swift-format | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "Shwift", | ||
"dockerFile": "Dockerfile", | ||
|
||
"capAdd": [ | ||
"SYS_PTRACE" | ||
], | ||
"securityOpt": [ | ||
"seccomp=unconfined" | ||
], | ||
|
||
"mounts": [ | ||
// Use a named volume for the build products for optimal performance (https://code.visualstudio.com/remote/advancedcontainers/improve-performance?WT.mc_id=javascript-14373-yolasors#_use-a-targeted-named-volume) | ||
"source=${localWorkspaceFolderBasename}-build,target=${containerWorkspaceFolder}/build,type=volume" | ||
], | ||
"remoteEnv": { | ||
// Useful for disambiguating devcontainers | ||
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" | ||
}, | ||
|
||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"lldb.library": "/usr/lib/liblldb.so", | ||
"lldb.launch.expressions": "native", | ||
|
||
"[swift]": { | ||
"editor.defaultFormatter": "vknabel.vscode-apple-swift-format" | ||
}, | ||
}, | ||
"extensions": [ | ||
"sswg.swift-lang", | ||
"vknabel.vscode-apple-swift-format", | ||
], | ||
} | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Check Commit | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
jobs: | ||
validate-formatting: | ||
name: Validate Formatting | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Initialize devcontainer | ||
uses: devcontainers/[email protected] | ||
with: | ||
push: never | ||
runCmd: | | ||
git status | ||
echo "Devcontainer Initialized." | ||
- name: Validate swift formatting | ||
uses: devcontainers/[email protected] | ||
with: | ||
push: never | ||
runCmd: | | ||
swift-format \ | ||
--in-place \ | ||
--recursive Sources Tests | ||
git config --global --add safe.directory /workspaces/Shwift | ||
git diff | ||
git diff-index --quiet HEAD -- | ||
test-macos: | ||
name: Run Tests on macOS | ||
strategy: | ||
fail-fast: false | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Correct Swift Version | ||
uses: compnerd/gha-setup-swift@main | ||
with: | ||
branch: swift-5.9-release | ||
tag: 5.9-RELEASE | ||
- run: swift build | ||
- run: swift test | ||
- run: swift run ScriptExample | ||
|
||
test-devcontainer: | ||
name: Run Tests in devcontainer | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Initialize devcontainer | ||
uses: devcontainers/[email protected] | ||
with: | ||
push: never | ||
runCmd: | | ||
echo "Devcontainer Initialized." | ||
- name: Test Shwift | ||
uses: devcontainers/[email protected] | ||
with: | ||
push: never | ||
runCmd: | | ||
swift build | ||
swift test | ||
swift run ScriptExample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.