1010 SWIFTLY_INIT : init --skip-install --verbose --assume-yes
1111 SWIFTLY_INSTALL : install --use --verbose --assume-yes --post-install-file=post-install.sh
1212 SWIFTLY_DL : https://download.swift.org/swiftly
13- SWIFTLY_HOME_DIR : ${{ github.workspace }}/../_swiftly
14- SWIFTLY_BIN_DIR : ${{ github.workspace }}/../_swiftly/bin
1513
1614jobs :
1715 build :
2725 if : ${{ startsWith( matrix.os, 'macos' ) }}
2826 shell : bash
2927 run : |
30- mkdir -p $SWIFTLY_HOME_DIR /install
31- cd $SWIFTLY_HOME_DIR /install
28+ mkdir -p $HOME/.swiftly /install
29+ cd $HOME/.swiftly /install
3230 curl -O $SWIFTLY_DL/darwin/swiftly.pkg
3331 installer -pkg swiftly.pkg -target CurrentUserHomeDirectory
3432 ln $HOME/.swiftly/bin/swiftly swiftly
@@ -38,45 +36,45 @@ jobs:
3836 shell : bash
3937 run : |
4038 sudo apt-get -y install libcurl4-openssl-dev
41- mkdir -p $SWIFTLY_HOME_DIR /install
42- cd $SWIFTLY_HOME_DIR /install
39+ mkdir -p $HOME/.swiftly /install
40+ cd $HOME/.swiftly /install
4341 curl -O $SWIFTLY_DL/linux/swiftly-$(uname -m).tar.gz
4442 tar vzxf swiftly-$(uname -m).tar.gz
4543
4644 - name : Install/Post/POSIX
4745 if : ${{ startsWith( matrix.os, 'ubuntu' ) || startsWith( matrix.os, 'macos' ) }}
4846 shell : bash
4947 run : |
50- cd $SWIFTLY_HOME_DIR
48+ cd $HOME/.swiftly
5149 ls -laF ./install
52- $SWIFTLY_HOME_DIR /install/swiftly $SWIFTLY_INIT
53- $SWIFTLY_HOME_DIR /bin/swiftly $SWIFTLY_INSTALL ${{ matrix.swift-version }}
54- if [ -f $SWIFTLY_HOME_DIR /post-install.sh ]; then
55- . $SWIFTLY_HOME_DIR /post-install.sh
50+ . /install/swiftly $SWIFTLY_INIT
51+ . /bin/swiftly $SWIFTLY_INSTALL ${{ matrix.swift-version }}
52+ if [ -f . /post-install.sh ]; then
53+ . . /post-install.sh
5654 fi
5755
5856 - uses : actions/checkout@master
5957
6058 - name : Info
6159 shell : bash
6260 run : |
63- $SWIFTLY_HOME_DIR /bin/swiftly use ${{ matrix.swift-version }}
61+ $HOME/.swiftly /bin/swiftly use ${{ matrix.swift-version }}
6462 hash -r
6563 cd swift
6664 swift --version -v
6765
6866 - name : Build
6967 shell : bash
7068 run : |
71- $SWIFTLY_HOME_DIR /bin/swiftly use ${{ matrix.swift-version }}
69+ $HOME/.swiftly /bin/swiftly use ${{ matrix.swift-version }}
7270 hash -r
7371 cd swift
7472 swift build -v
7573
7674 - name : Test
7775 shell : bash
7876 run : |
79- $SWIFTLY_HOME_DIR /bin/swiftly use ${{ matrix.swift-version }}
77+ $HOME/.swiftly /bin/swiftly use ${{ matrix.swift-version }}
8078 hash -r
8179 cd swift
8280 swift test -v
0 commit comments