|
15 | 15 | include: |
16 | 16 | - swift-version: 5.8.0 |
17 | 17 | carton-version: 0.19.0 |
| 18 | + swift-format-version: 508.0.1 |
| 19 | + swift-lint-version: 0.52.2 |
18 | 20 |
|
19 | 21 | steps: |
20 | 22 | - name: Checkout the repo |
|
34 | 36 | mv binaryen-version_113 binaryen |
35 | 37 | cp binaryen/bin/* /usr/local/bin |
36 | 38 |
|
| 39 | + - name: Setup Swift version |
| 40 | + uses: swift-actions/setup-swift@v1 |
| 41 | + with: |
| 42 | + swift-version: "5.8.0" |
| 43 | + |
37 | 44 | - name: Build carton |
38 | 45 | env: |
39 | 46 | GH_TOKEN: ${{ github.token }} |
|
50 | 57 | tar xf swift-toolcahin.tar.gz |
51 | 58 | mv swift-wasm-* wasm-${{ matrix.swift-version }}-RELEASE |
52 | 59 |
|
| 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 | +
|
53 | 78 | - name: Create WASM build tools bundle |
54 | 79 | id: create-build |
55 | 80 | run: | |
|
58 | 83 | mkdir -p $wasm_tools_dir |
59 | 84 | mv carton/.build/release/carton $wasm_tools_dir/carton |
60 | 85 | 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/ |
61 | 89 | mv wasm-${{ matrix.swift-version }}-RELEASE $wasm_tools_dir/ |
62 | 90 | tar cf - $wasm_tools_dir | lz4 > $wasm_tools_dir.tar.lz4 |
63 | 91 |
|
|
0 commit comments