Skip to content

Commit 601ae28

Browse files
committed
Update CI
1 parent e57f11b commit 601ae28

2 files changed

Lines changed: 28 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: test
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [ main ]
66
pull_request:
7-
branches: [main]
7+
branches: [ main ]
88

99
permissions:
1010
contents: read
@@ -20,6 +20,10 @@ jobs:
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v6
23+
- name: Setup Swift
24+
uses: swift-actions/setup-swift@v3
25+
with:
26+
swift-version: "6.3"
2327
- name: Run tests
2428
run: swift test
2529

@@ -35,12 +39,16 @@ jobs:
3539
- name: tvOS
3640
destination: platform=tvOS Simulator,OS=latest,name=Apple TV 4K (3rd generation)
3741
- name: watchOS
38-
destination: platform=watchOS Simulator,OS=latest,name=Apple Watch Series 10 (46mm)
42+
destination: platform=watchOS Simulator,OS=latest,name=Apple Watch Series 10
3943
- name: visionOS
4044
destination: platform=visionOS Simulator,OS=latest,name=Apple Vision Pro
4145
steps:
4246
- name: Checkout code
4347
uses: actions/checkout@v6
48+
- name: Setup Swift
49+
uses: swift-actions/setup-swift@v3
50+
with:
51+
swift-version: "6.3"
4452
- name: Run tests
4553
run: |
4654
xcodebuild test \
@@ -54,7 +62,8 @@ jobs:
5462
include:
5563
- name: "6.3"
5664
container: "swift:6.3"
57-
test-args: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
65+
test-args: "-Xswiftc -warnings-as-errors
66+
--explicit-target-dependency-import-check error"
5867
- name: "nightly-main"
5968
container: "swiftlang/swift:nightly-main-jammy"
6069
test-args: ""
@@ -74,6 +83,7 @@ jobs:
7483
uses: actions/checkout@v6
7584
- name: Install Swift SDK for Linux Musl
7685
run: |
86+
apt-get update -y -q && apt-get install -y -q curl jq
7787
version_num="$(swiftc --version | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1)"
7888
tag="swift-${version_num}-RELEASE"
7989
sdk_info="$(curl -s https://www.swift.org/api/v1/install/releases.json | jq -r --arg tag "$tag" '.[] | select(.tag == $tag).platforms[] | select(.platform == "static-sdk") | [.version, .checksum] | @tsv')"
@@ -95,9 +105,11 @@ jobs:
95105
tag="$(swiftc --version | grep -Po '(?<=\().+(?=\))')"
96106
checksum="$(curl -s https://www.swift.org/api/v1/install/releases.json | \
97107
jq -r --arg tag "$tag" '.[] | select(.tag == $tag).platforms[] | select(.platform == "wasm-sdk").checksum // empty')"
98-
swift sdk install https://download.swift.org/$(echo $tag | tr [A-Z] [a-z])/wasm-sdk/$tag/${tag}_wasm.artifactbundle.tar.gz --checksum "$checksum"
108+
swift sdk install https://download.swift.org/$(echo $tag | tr [A-Z] [a-z])/wasm-sdk/$tag/"$tag"_wasm.artifactbundle.tar.gz --checksum $checksum
99109
- name: Build for WebAssembly
100-
run: swift build --swift-sdk wasm32-unknown-wasi
110+
run: |
111+
tag="$(swiftc --version | grep -Po '(?<=\().+(?=\))')"
112+
swift build --swift-sdk "$tag"_wasm
101113
102114
windows:
103115
strategy:

Sources/CZlib/include/CZlib.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
#define CZLIB_H
33

44
#include "zlib.h"
5+
#if __has_include(<lifetimebound.h>)
56
#include <lifetimebound.h>
7+
#endif
8+
#if __has_include(<ptrcheck.h>)
69
#include <ptrcheck.h>
10+
#endif
11+
#ifndef __counted_by
12+
#define __counted_by(N)
13+
#endif
14+
#ifndef __noescape
15+
#define __noescape
16+
#endif
717

818
#if defined(_WIN32)
919
typedef unsigned char uint8_t;

0 commit comments

Comments
 (0)