tangled
alpha
login
or
join now
khanwinter.com
/
CBOR
A fast, safe, and efficient CBOR serialization library for Swift on any platform.
swiftpackageindex.com/thecoolwinter/CBOR/1.1.1/documentation/cbor
atproto
swift
cbor
2
fork
atom
overview
issues
pulls
pipelines
Lets try caching build things
Khan Winter
5 months ago
e93eb58e
9aae121a
+34
-6
1 changed file
expand all
collapse all
unified
split
.github
workflows
ci.yml
+34
-6
.github/workflows/ci.yml
···
29
29
- uses: swift-actions/setup-swift@v2
30
30
with:
31
31
swift-version: "6.1"
32
32
+
- name: Restore .build
33
33
+
id: "restore-build"
34
34
+
uses: actions/cache/restore@v4
35
35
+
with:
36
36
+
path: .build
37
37
+
key: "swiftpm-tests-build-${{ runner.os }}-${{ github.event.pull_request.base.sha || github.event.after }}"
38
38
+
restore-keys: "swiftpm-tests-build-${{ runner.os }}-"
32
39
- name: Testing Package
33
33
-
run: swift test
40
40
+
run: swift build --build-tests
41
41
+
- name: Cache .build
42
42
+
if: steps.restore-build.outputs.cache-hit != 'true'
43
43
+
uses: actions/cache/save@v4
44
44
+
with:
45
45
+
path: .build
46
46
+
key: "swiftpm-tests-build-${{ runner.os }}-${{ github.event.pull_request.base.sha || github.event.after }}"
47
47
+
- name: Testing Package
48
48
+
run: swift test --skip-build
34
49
35
50
test-macos:
36
51
name: Testing and Fuzzing CBOR (macOS)
···
42
57
- uses: swift-actions/setup-swift@next
43
58
with:
44
59
swift-version: "6.1"
60
60
+
- name: Restore .build
61
61
+
id: "restore-build"
62
62
+
uses: actions/cache/restore@v4
63
63
+
with:
64
64
+
path: .build
65
65
+
key: "swiftpm-tests-build-${{ runner.os }}-${{ github.event.pull_request.base.sha || github.event.after }}"
66
66
+
restore-keys: "swiftpm-tests-build-${{ runner.os }}-"
67
67
+
- name: Building Package
68
68
+
run: set -o pipefail && xcrun --toolchain swift 6.1 --run swift build --build-tests --sanitize fuzzer | xcbeautify
69
69
+
- name: Cache .build
70
70
+
if: steps.restore-build.outputs.cache-hit != 'true'
71
71
+
uses: actions/cache/save@v4
72
72
+
with:
73
73
+
path: .build
74
74
+
key: "swiftpm-tests-build-${{ runner.os }}-${{ github.event.pull_request.base.sha || github.event.after }}"
45
75
- name: Testing Package
46
46
-
run: set -o pipefail && swift test | xcbeautify
47
47
-
- name: Building Fuzzing Target
48
48
-
run: set -o pipefail && swift build -c release --sanitize fuzzer,address | xcbeautify
49
49
-
- name: Fuzzing For 30 Seconds
76
76
+
run: set -o pipefail && xcrun --toolchain swift 6.1 --run swift test --skip-build | xcbeautify
77
77
+
- name: Fuzzing For 15 Seconds
50
78
run: |
51
79
mkdir -p .fuzz
52
80
mkdir -p .fuzz/new-corpus
53
81
mkdir -p .fuzz/corpus
54
82
mkdir -p .fuzz/artifacts
55
55
-
./.build/release/Fuzzing .fuzz/new-corpus .fuzz/corpus -max_total_time=10 -artifact_prefix=.fuzz/artifacts -max_len=1000000
83
83
+
./.build/debug/Fuzzing .fuzz/new-corpus .fuzz/corpus -max_total_time=15 -artifact_prefix=.fuzz/artifacts -max_len=1000000
56
84
- name: "Upload Fuzzing Artifacts (if available)"
57
85
uses: actions/upload-artifact@v4
58
86
with: