Skip to content

Commit d840bbc

Browse files
committed
Init commit
0 parents  commit d840bbc

25 files changed

+851
-0
lines changed

.codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
codecov:
2+
require_ci_to_pass: no
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: auto
8+
threshold: 5
9+
ignore:
10+
- Tests
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Compatibility tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
compatibility_tests_macos:
11+
name: Execute compatibility tests
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- os: macos-15
17+
xcode-version: "16.0" # Swift 6.0
18+
runs-on: ${{ matrix.os }}
19+
env:
20+
OPENBOX_WERROR: 1
21+
OPENBOX_RENDERBOX: 1
22+
OPENBOX_COMPATIBILITY_TEST: 1
23+
OPENBOX_USE_LOCAL_DEPS: 1
24+
OPENBOX_TARGET_RELEASE: 2024
25+
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
26+
GH_TOKEN: ${{ github.token }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Setup Xcode
30+
uses: maxim-lobanov/setup-xcode@v1
31+
with:
32+
xcode-version: ${{ matrix.xcode-version }}
33+
- name: Set up build environment
34+
run: Scripts/CI/darwin_setup_build.sh
35+
shell: bash
36+
- name: Swift version
37+
run: swift --version
38+
- name: Run tests against Apple's RENDERBOX on macOS via SwiftPM
39+
run: |
40+
swift test \
41+
--build-path .build-compatibility-test-debug
42+
- name: Run tests against Apple's RENDERBOX on macOS via Xcode
43+
run: |
44+
xcodebuild test \
45+
-scheme OpenBox-Package \
46+
-sdk macosx \
47+
-destination "platform=macOS" \
48+
-skipPackagePluginValidation \
49+
-skipMacroValidation

.github/workflows/ios.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: iOS
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
ios_test:
11+
name: Execute tests on iOS
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [macos-15]
16+
xcode-version: ["16.0"] # Swift 6.0
17+
ios-version: ["18.0"]
18+
include:
19+
- ios-version: "18.0"
20+
ios-simulator-name: "iPhone 16 Pro"
21+
runs-on: ${{ matrix.os }}
22+
env:
23+
OPENBOX_WERROR: 1
24+
OPENBOX_RENDERBOX: 0
25+
OPENBOX_COMPATIBILITY_TEST: 0
26+
OPENBOX_USE_LOCAL_DEPS: 1
27+
OPENBOX_TARGET_RELEASE: 2024
28+
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
29+
GH_TOKEN: ${{ github.token }}
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Setup Xcode
33+
uses: maxim-lobanov/setup-xcode@v1
34+
with:
35+
xcode-version: ${{ matrix.xcode-version }}
36+
- name: Swift version
37+
run: swift --version
38+
- name: Set up build environment
39+
run: Scripts/CI/darwin_setup_build.sh
40+
shell: bash
41+
- name: Build in debug mode on iOS
42+
run: |
43+
xcodebuild build \
44+
-scheme OpenBox-Package \
45+
-configuration Debug \
46+
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
47+
-derivedDataPath .build-debug \
48+
-skipMacroValidation \
49+
-skipPackagePluginValidation \
50+
OTHER_SWIFT_FLAGS="-warnings-as-errors"
51+
- name: Build and run tests in debug mode with coverage on iOS Simulator
52+
run: |
53+
xcodebuild test \
54+
-scheme OpenBox-Package \
55+
-configuration Debug \
56+
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
57+
-enableCodeCoverage=YES \
58+
-derivedDataPath .build-test-debug \
59+
-skipPackagePluginValidation \
60+
-skipMacroValidation
61+
# OTHER_SWIFT_FLAGS="-warnings-as-errors" Conflicting options '-warnings-as-errors' and '-suppress-warnings'

.github/workflows/macos.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: macOS
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
macos_test:
11+
name: Execute tests on macOS
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [macos-15]
16+
xcode-version: [16.0] # Swift 6.0
17+
runs-on: ${{ matrix.os }}
18+
env:
19+
OPENBOX_WERROR: 1
20+
OPENBOX_RENDERBOX: 0
21+
OPENBOX_COMPATIBILITY_TEST: 0
22+
OPENBOX_USE_LOCAL_DEPS: 1
23+
OPENBOX_TARGET_RELEASE: 2024
24+
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
25+
GH_TOKEN: ${{ github.token }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Setup Xcode
29+
uses: maxim-lobanov/setup-xcode@v1
30+
with:
31+
xcode-version: ${{ matrix.xcode-version }}
32+
- name: Set up build environment
33+
run: Scripts/CI/darwin_setup_build.sh
34+
shell: bash
35+
- name: Swift version
36+
run: swift --version
37+
- name: Build and run tests in debug mode with coverage
38+
run: |
39+
swift test \
40+
-c debug \
41+
--enable-code-coverage \
42+
--build-path .build-test-debug
43+
xcrun llvm-cov show \
44+
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
45+
.build-test-debug/debug/OPENBOXPackageTests.xctest/Contents/MacOS/OPENBOXPackageTests \
46+
> coverage.txt
47+
- name: Build and run tests in release mode
48+
run: |
49+
swift test \
50+
-c release \
51+
--enable-code-coverage \
52+
--build-path .build-test-release
53+
- uses: codecov/codecov-action@v5
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}
56+
verbose: true

.github/workflows/ubuntu.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Ubuntu
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
ubuntu_test:
11+
name: Execute tests on Ubuntu
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
swift_version: ["6.0"]
16+
runs-on: ubuntu-22.04
17+
env:
18+
OPENBOX_WERROR: 1
19+
OPENBOX_RENDERBOX: 0
20+
OPENBOX_COMPATIBILITY_TEST: 0
21+
container: swift:${{ matrix.swift_version }}-jammy
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Swift version
25+
run: |
26+
which swift && swift --version
27+
- name: Building and running tests in debug mode with coverage
28+
run: |
29+
swift test \
30+
-c debug \
31+
--enable-code-coverage \
32+
--build-path .build-test-debug
33+
llvm-cov show \
34+
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
35+
.build-test-debug/debug/OPENBOXPackageTests.xctest \
36+
> coverage.txt
37+
- name: Building and running tests in release mode
38+
run: |
39+
swift test \
40+
-c release \
41+
--build-path .build-test-release
42+
- uses: codecov/codecov-action@v3
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
verbose: true

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
xcuserdata/
5+
DerivedData/
6+
.swiftpm/configuration/registries.json
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.netrc

.spi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- swift_version: 6.0
5+
documentation_targets: [OpenBox]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Kyle-Ye
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Package.resolved

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)