@@ -43,36 +43,12 @@ jobs:
43
43
linux :
44
44
runs-on : ubuntu-24.04
45
45
name : Ubuntu 24.04
46
-
47
- env :
48
- SWIFT_PREFIX : " swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE"
49
- SWIFT_ID : " swift-5.10.1-RELEASE-ubuntu24.04"
50
-
51
46
steps :
52
- - name : Cache Swift toolchain
53
- uses : actions/cache@v2
54
- with :
55
- path : ${{ env.SWIFT_ID }}.tar.gz
56
- key : ${{ env.SWIFT_ID }}
57
-
58
- - name : Cache status
59
- id : cache_status
60
- uses : andstor/file-existence-action@v1
47
+ - name : Install Swift
48
+ uses : tayloraswift/swift-install-action@master
61
49
with :
62
- files : ${{ env.SWIFT_ID }}.tar.gz
63
-
64
- - name : Download Swift
65
- if : steps.cache_status.outputs.files_exists == 'false'
66
- run : |
67
- curl https://download.swift.org/$SWIFT_PREFIX/$SWIFT_ID.tar.gz \
68
- --output $SWIFT_ID.tar.gz
69
-
70
- - name : Set up Swift
71
- run : |
72
- mkdir -p $HOME/$SWIFT_ID
73
- tar -xzf $SWIFT_ID.tar.gz -C $HOME/$SWIFT_ID --strip 1
74
- echo "$HOME/$SWIFT_ID/usr/bin" >> $GITHUB_PATH
75
- cat $GITHUB_PATH
50
+ swift-prefix : " swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE"
51
+ swift-id : " swift-5.10.1-RELEASE-ubuntu24.04"
76
52
77
53
# This clobbers everything in the current directory, which is why we installed
78
54
# the Swift toolchain in the home directory.
@@ -89,13 +65,13 @@ jobs:
89
65
swift build -c release \
90
66
--static-swift-stdlib \
91
67
--product unidoc-publish \
92
- -Xcxx -I$HOME/$SWIFT_ID/usr /lib/swift \
93
- -Xcxx -I$HOME/$SWIFT_ID/usr /lib/swift/Block
68
+ -Xcxx -I$SWIFT_INSTALLATION /lib/swift \
69
+ -Xcxx -I$SWIFT_INSTALLATION /lib/swift/Block
94
70
swift build -c release \
95
71
--static-swift-stdlib \
96
72
--product unidoc-tools \
97
- -Xcxx -I$HOME/$SWIFT_ID/usr /lib/swift \
98
- -Xcxx -I$HOME/$SWIFT_ID/usr /lib/swift/Block
73
+ -Xcxx -I$SWIFT_INSTALLATION /lib/swift \
74
+ -Xcxx -I$SWIFT_INSTALLATION /lib/swift/Block
99
75
100
76
- name : Upload products
101
77
env :
0 commit comments