Skip to content

Commit 18d6585

Browse files
Merge pull request #34 from GoodNotes/yt/remove-unused-tools
Remove no longer used tools from Docker image and wasm-tools
2 parents 8da3863 + 157dd8a commit 18d6585

File tree

3 files changed

+0
-49
lines changed

3 files changed

+0
-49
lines changed

.github/workflows/build_swift_tools.yml

-22
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
include:
1616
- swift-version: 5.9.1
1717
carton-version: 0.20.0
18-
swift-format-version: 508.0.1
19-
swift-lint-version: 0.52.3
2018

2119
steps:
2220
- name: Checkout the repo
@@ -52,24 +50,6 @@ jobs:
5250
tar xf swift-toolcahin.tar.gz
5351
mv swift-wasm-* wasm-${{ matrix.swift-version }}-RELEASE
5452
55-
- name: Build Swift-format version ${{ matrix.swift-format-version }}
56-
env:
57-
GH_TOKEN: ${{ github.token }}
58-
run: |
59-
gh repo clone apple/swift-format -- --branch ${{ matrix.swift-format-version }} --single-branch
60-
cd swift-format
61-
swift build -c release
62-
.build/release/swift-format --version
63-
64-
- name: Build SwiftLint version ${{ matrix.swift-lint-version }}
65-
env:
66-
GH_TOKEN: ${{ github.token }}
67-
run: |
68-
gh repo clone realm/SwiftLint -- --branch ${{ matrix.swift-lint-version }} --single-branch
69-
cd SwiftLint
70-
swift build -c release -Xswiftc -static-stdlib --product swiftlint
71-
.build/release/swiftlint --version
72-
7353
- name: Create WASM build tools bundle
7454
id: create-build
7555
run: |
@@ -78,8 +58,6 @@ jobs:
7858
mkdir -p $wasm_tools_dir
7959
mv carton/.build/release/carton $wasm_tools_dir/carton
8060
mv binaryen/bin/wasm-opt $wasm_tools_dir/wasm-opt
81-
mv swift-format/.build/release/swift-format $wasm_tools_dir/swift-format
82-
mv SwiftLint/.build/release/swiftlint $wasm_tools_dir/
8361
mv wasm-${{ matrix.swift-version }}-RELEASE $wasm_tools_dir/
8462
tar cf - $wasm_tools_dir | lz4 -12 > $wasm_tools_dir.tar.lz4
8563

.github/workflows/docker.yml

-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ jobs:
4646
push: ${{ github.event_name != 'pull_request' }}
4747
tags: ghcr.io/${{ env.REPOSITORY_LC }}:${{ env.DOCKER_TAG }}
4848
build-args: |
49-
SWIFLINT_DOCKER_IMAGE=ghcr.io/realm/swiftlint:0.52.3
5049
CARTON_TAG=0.20.0
5150
SWIFT_DOCKER_IMAGE=swift:5.9.0-jammy
5251
SWIFT_TAG=wasm-5.9.1-RELEASE
53-
SWIFT_FORMAT_TAG=508.0.1
5452
NODE_VERSION=18.x
5553
OPEN_JDK_VERSION=11
5654
CYPRESS_VERSION=12.3.0

Dockerfile

-25
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
ARG SWIFLINT_DOCKER_IMAGE
22
ARG SWIFT_DOCKER_IMAGE
33

4-
FROM $SWIFLINT_DOCKER_IMAGE as swiftLint
5-
64
FROM $SWIFT_DOCKER_IMAGE as carton-builder
75
ARG SWIFT_TAG
86
ARG CARTON_TAG
@@ -14,20 +12,6 @@ RUN git clone https://github.com/swiftwasm/carton.git && \
1412
swift build -c release && \
1513
mv .build/release/carton /usr/bin
1614

17-
FROM $SWIFT_DOCKER_IMAGE as swift-format-builder
18-
19-
ARG SWIFT_FORMAT_TAG
20-
21-
# FIXME(katei): The sed hack is required to pin the swift-syntax version to `0.50700.0`.
22-
# Without this hack, SwiftPM uses swift-syntax `0.50700.1`, which is incompatible with 5.7.0
23-
# Docker image. Remove the hack after Apple folks will release an image compatible with swift-syntax
24-
# `0.50700.1` (probably `swift:5.7.1`?)
25-
RUN git clone https://github.com/apple/swift-format.git && \
26-
cd swift-format && \
27-
git checkout "tags/$SWIFT_FORMAT_TAG" && \
28-
sed -i -e 's/.upToNextMinor(from: "0.50700.0")/exact: "0.50700.0"/' Package.swift && \
29-
swift build -c release
30-
3115
FROM ubuntu:22.04 as binaryen
3216

3317
RUN apt-get update && apt-get install -y curl
@@ -131,19 +115,12 @@ RUN wget --no-verbose -O /tmp/firefox.tar.bz2 \
131115
&& rm /tmp/firefox.tar.bz2 \
132116
&& ln -fs /opt/firefox/firefox /usr/bin/firefox
133117

134-
# Intall swift lint from docker
135-
COPY --from=swiftLint /usr/bin/swiftlint /usr/bin/swiftlint
136-
COPY --from=swiftLint /usr/lib/libsourcekitdInProc.so /usr/lib/
137-
138118
# Install latest carton tool
139119
COPY --from=carton-builder /usr/bin/carton /usr/bin/carton
140120

141121
# Install latest binaryen tools (carton still uses some legacy version)
142122
COPY --from=binaryen binaryen-version_105/bin/* /usr/local/bin
143123

144-
# Install swift format
145-
COPY --from=swift-format-builder swift-format/.build/release/swift-format /usr/local/bin/swift-format
146-
147124
COPY --from=symbolicator-builder wasm-split /usr/local/bin
148125

149126
# Print Installed Versions
@@ -153,8 +130,6 @@ RUN node --version
153130
RUN npm --version
154131
RUN npx --version
155132
RUN yarn --version
156-
RUN swiftlint --version
157-
RUN swift-format --version
158133
RUN cypress --version
159134
RUN wasm-opt --version
160135
RUN brotli --version

0 commit comments

Comments
 (0)