Skip to content

Commit 3327e38

Browse files
committed
iterate on workflow syntax
1 parent c28d89c commit 3327e38

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/swift.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
cd ..
3636
- name: Install Swift Toolchain
3737
run: |
38-
pwd
39-
cd ci
4038
curl --verbose -L -o swift-5.6-RELEASE-ubuntu20.04.tar.gz https://download.swift.org/swift-5.6-release/ubuntu2004/swift-5.6-RELEASE/swift-5.6-RELEASE-ubuntu20.04.tar.gz
4139
echo "Sha sum: $(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')"
4240
if [ "$(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')" != "${EXPECTED_SWIFT_SHASUM}" ]; then
@@ -61,6 +59,9 @@ jobs:
6159
pwd
6260
./genbindings.sh ../rust-lightning true
6361
cd ..
62+
- name: Check that the latest headers are in the swift repo
63+
run: |
64+
git diff --no-index --exit-code ci/bindings/LDK bindings/LDK
6465
- name: Debug bindings target directory structure
6566
run: |
6667
cd ci
@@ -102,7 +103,7 @@ jobs:
102103
- name: Build Swift bindings package
103104
run: |
104105
cd ci/LDKSwift
105-
../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift build
106+
../../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift build
106107
env:
107108
LDK_C_BINDINGS_BASE: /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
108109
LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
@@ -111,7 +112,7 @@ jobs:
111112
run: |
112113
python ci/toggle_address_sanitation_library.py off
113114
cd ci/LDKSwift
114-
../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
115+
../../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
115116
env:
116117
LDK_C_BINDINGS_BASE: /home/runner/work/ldk-swift/ldk-swift/ci/ldk-c-bindings
117118
LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
@@ -121,9 +122,6 @@ jobs:
121122
with:
122123
name: ci_archive
123124
path: ci
124-
- name: Check that the latest headers are in the swift repo
125-
run: |
126-
git diff --exit-code
127125

128126
test_bindings_with_sanitizer:
129127
runs-on: ubuntu-20.04
@@ -134,6 +132,18 @@ jobs:
134132
with:
135133
name: ci_archive
136134
path: ci
135+
- name: Install Swift Toolchain
136+
run: |
137+
curl --verbose -L -o swift-5.6-RELEASE-ubuntu20.04.tar.gz https://download.swift.org/swift-5.6-release/ubuntu2004/swift-5.6-RELEASE/swift-5.6-RELEASE-ubuntu20.04.tar.gz
138+
echo "Sha sum: $(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')"
139+
if [ "$(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')" != "${EXPECTED_SWIFT_SHASUM}" ]; then
140+
echo "Bad hash"
141+
echo "Contents: \n$(cat swift-5.6-RELEASE-ubuntu20.04.tar.gz)"
142+
exit 1
143+
fi
144+
tar xvvf swift-5.6-RELEASE-ubuntu20.04.tar.gz
145+
env:
146+
EXPECTED_SWIFT_SHASUM: 3f0d926bfc08eea00a69b1d992f2ab5e08155d97476096a3ef959fe7c4cbd58b
137147
- name: Install Valgrind and build utilities
138148
run: |
139149
sudo apt-get update

0 commit comments

Comments
 (0)