Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit adef57b

Browse files
Build swift format and swift lint
1 parent 2de983e commit adef57b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/release_carton.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
include:
1616
- swift-version: 5.8.0
1717
carton-version: 0.19.0
18+
swift-format-version: 508.0.1
19+
swift-lint-version: 0.52.2
1820

1921
steps:
2022
- name: Checkout the repo
@@ -34,6 +36,11 @@ jobs:
3436
mv binaryen-version_113 binaryen
3537
cp binaryen/bin/* /usr/local/bin
3638
39+
- name: Setup Swift version
40+
uses: swift-actions/setup-swift@v1
41+
with:
42+
swift-version: "5.8.0"
43+
3744
- name: Build carton
3845
env:
3946
GH_TOKEN: ${{ github.token }}
@@ -50,6 +57,24 @@ jobs:
5057
tar xf swift-toolcahin.tar.gz
5158
mv swift-wasm-* wasm-${{ matrix.swift-version }}-RELEASE
5259
60+
- name: Build Swift-format version ${{ matrix.swift-format-version }}
61+
env:
62+
GH_TOKEN: ${{ github.token }}
63+
run: |
64+
gh repo clone apple/swift-format -- --branch ${{ matrix.swift-format-version }} --single-branch
65+
cd swift-format
66+
swift build -c release
67+
.build/release/swift-format --version
68+
69+
- name: Build SwiftLint version ${{ matrix.swift-lint-version }}
70+
env:
71+
GH_TOKEN: ${{ github.token }}
72+
run: |
73+
gh repo clone realm/SwiftLint -- --branch ${{ matrix.swift-lint-version }} --single-branch
74+
cd SwiftLint
75+
swift build -c release -Xswiftc -static-stdlib -Xlinker -lCFURLSessionInterface -Xlinker -lCFXMLInterface -Xlinker -lcurl -Xlinker -lxml2 -Xswiftc -I. -Xlinker -fuse-ld=lld -Xlinker -L/usr/lib/swift/linux --product swiftlint
76+
.build/release/swiftlint --version
77+
5378
- name: Create WASM build tools bundle
5479
id: create-build
5580
run: |
@@ -58,6 +83,9 @@ jobs:
5883
mkdir -p $wasm_tools_dir
5984
mv carton/.build/release/carton $wasm_tools_dir/carton
6085
mv binaryen/bin/wasm-opt $wasm_tools_dir/wasm-opt
86+
mv swift-format/.build/release/swift-format $wasm_tools_dir/swift-format
87+
mv swift-format/.build/release/*.dylib $wasm_tools_dir/
88+
mv SwiftLint/.build/release/swiftlint $wasm_tools_dir/
6189
mv wasm-${{ matrix.swift-version }}-RELEASE $wasm_tools_dir/
6290
tar cf - $wasm_tools_dir | lz4 > $wasm_tools_dir.tar.lz4
6391

0 commit comments

Comments
 (0)