forked from roop/citron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'windows' of github.com:dabrahams/citron
- Loading branch information
Showing
46 changed files
with
1,683 additions
and
46 deletions.
There are no files selected for viewing
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,4 @@ | ||
ARG SWIFT_VERSION | ||
|
||
FROM swift:${SWIFT_VERSION} | ||
|
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,46 @@ | ||
{ | ||
"name": "Swift", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"SWIFT_VERSION" : "5.8" | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": "false", | ||
"username": "vscode", | ||
"userUid": "1000", | ||
"userGid": "1000", | ||
"upgradePackages": "false" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "os-provided", | ||
"ppa": "false" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", | ||
"seccomp=unconfined" | ||
], | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"lldb.library": "/usr/lib/liblldb.so" | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"sswg.swift-lang" | ||
] | ||
} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
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,80 @@ | ||
--- | ||
name: Build and test | ||
|
||
"on": | ||
push: | ||
branches: ["**"] | ||
|
||
jobs: | ||
|
||
devcontainer: | ||
name: "Devcontainer: ${{ matrix.os }}/${{ matrix.configuration }}" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
configuration: [debug] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and Test | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
runCmd: swift test -c ${{ matrix.configuration }} | ||
|
||
native: | ||
name: "Native: ${{ matrix.os }}/${{ matrix.configuration }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
configuration: [debug] | ||
|
||
include: | ||
# Default values to add | ||
- shell: 'bash -eo pipefail {0}' | ||
- build-options: '--explicit-target-dependency-import-check=error' | ||
|
||
# Overrides for the defaults | ||
- shell: pwsh | ||
os: windows-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: ${{ matrix.shell }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Swift (Unices) | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
uses: 'swift-actions/setup-swift@v1' | ||
with: | ||
version: 5.9 | ||
|
||
- name: Setup Swift (Windows) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
uses: 'compnerd/gha-setup-swift@main' | ||
with: | ||
github-repo: thebrowsercompany/swift-build | ||
release-asset-name: installer-amd64.exe | ||
release-tag-name: 20231010.3 | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Test (${{ matrix.configuration }}) | ||
run: > | ||
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }} | ||
--explicit-target-dependency-import-check=error | ||
- name: Test non-reentrant build (Windows) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
swift package clean | ||
$env:SPM_BUILD_TOOL_SUPPORT_NO_REENTRANT_BUILD=1 | ||
swift build -c ${{ matrix.configuration }} ${{ matrix.build-options }} --product citron | ||
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../SPMBuildToolSupport/SPMBuildToolSupport.swift |
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,4 @@ | ||
ARG SWIFT_VERSION | ||
|
||
FROM swift:${SWIFT_VERSION} | ||
|
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,46 @@ | ||
{ | ||
"name": "Swift", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"SWIFT_VERSION" : "5.8" | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": "false", | ||
"username": "vscode", | ||
"userUid": "1000", | ||
"userGid": "1000", | ||
"upgradePackages": "false" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "os-provided", | ||
"ppa": "false" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", | ||
"seccomp=unconfined" | ||
], | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"lldb.library": "/usr/lib/liblldb.so" | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"sswg.swift-lang" | ||
] | ||
} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
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,4 @@ | ||
;;; Directory Local Variables -*- no-byte-compile: t -*- | ||
;;; For more information see (info "(emacs) Directory Variables") | ||
|
||
((nil . ((fill-column . 100)))) |
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,12 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# A newline ending every file | ||
[*] | ||
# end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
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,94 @@ | ||
--- | ||
name: Build and test | ||
|
||
"on": | ||
push: | ||
branches: [main, rewrite] | ||
paths-ignore: | ||
- "Docs/**" | ||
- "**.md" | ||
- "README.md" | ||
- "LICENSE" | ||
- ".gitignore" | ||
pull_request: | ||
branches: ["**"] | ||
paths-ignore: | ||
- "Docs/**" | ||
- "**.md" | ||
- "README.md" | ||
- "LICENSE" | ||
- ".gitignore" | ||
|
||
jobs: | ||
|
||
devcontainer: | ||
name: "Devcontainer: ${{ matrix.os }}/${{ matrix.configuration }}" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
configuration: [debug] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and Test | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
runCmd: swift test -c ${{ matrix.configuration }} | ||
|
||
native: | ||
name: "Native: ${{ matrix.os }}/${{ matrix.configuration }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
configuration: [debug] | ||
|
||
include: | ||
# Default values to add | ||
- shell: 'bash -eo pipefail {0}' | ||
- build-options: '--explicit-target-dependency-import-check=error' | ||
|
||
# Overrides for the defaults | ||
- shell: pwsh | ||
os: windows-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: ${{ matrix.shell }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Swift (Unices) | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
uses: 'swift-actions/setup-swift@v1' | ||
with: | ||
version: 5.9 | ||
|
||
- name: Setup Swift (Windows) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
uses: 'compnerd/gha-setup-swift@main' | ||
with: | ||
github-repo: thebrowsercompany/swift-build | ||
release-asset-name: installer-amd64.exe | ||
release-tag-name: 20231010.3 | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Test (${{ matrix.configuration }}) | ||
run: > | ||
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }} | ||
--explicit-target-dependency-import-check=error | ||
- name: Test non-reentrant build (Windows) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
swift package clean | ||
$env:SPM_BUILD_TOOL_SUPPORT_NO_REENTRANT_BUILD=1 | ||
swift build -c ${{ matrix.configuration }} ${{ matrix.build-options }} --product GenerateResource | ||
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }} |
Oops, something went wrong.