Skip to content

Commit 6f352b1

Browse files
committed
reorder CI operations to fail fast and early
1 parent 29ceca7 commit 6f352b1

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/swift.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ jobs:
88
env:
99
TOOLCHAIN: stable
1010
steps:
11-
- name: Install native Rust toolchain, Valgrind, and build utilitis
12-
run: |
13-
sudo apt-get update
14-
sudo apt-get -y dist-upgrade
15-
sudo apt-get -y install cargo valgrind lld git g++ clang curl
1611
- name: Checkout source code
1712
uses: actions/checkout@v2
18-
- name: Install cbindgen
19-
run: cargo install --force cbindgen
13+
- name: Copy Swift bindings into sources
14+
run: |
15+
mkdir -p ci/LDKSwift/Sources/LDKSwift
16+
cp -a bindings/LDK/. ci/LDKSwift/Sources/LDKSwift
17+
cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
2018
- name: Checkout Rust-Lightning and LDK-C-Bindings git
2119
run: |
2220
git config --global user.email "[email protected]"
@@ -27,6 +25,13 @@ jobs:
2725
git checkout origin/2021-03-java-bindings-base
2826
cd ..
2927
git clone https://github.com/lightningdevkit/ldk-c-bindings
28+
- name: Install native Rust toolchain, Valgrind, and build utilitis
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get -y dist-upgrade
32+
sudo apt-get -y install cargo valgrind lld git g++ clang curl
33+
- name: Install cbindgen
34+
run: cargo install --force cbindgen
3035
- name: Install Swift Toolchain
3136
run: |
3237
curl https://swift.org/builds/swift-5.4.2-release/ubuntu2004/swift-5.4.2-RELEASE/swift-5.4.2-RELEASE-ubuntu20.04.tar.gz > swift-5.4.2-RELEASE-ubuntu20.04.tar.gz
@@ -42,15 +47,12 @@ jobs:
4247
cd ..
4348
- name: Copy new headers into bindings
4449
run: |
50+
mkdir -p ci/LDKCHeaders/Headers/
4551
cp ldk-c-bindings/lightning-c-bindings/include/*.h ci/LDKCHeaders/Headers/
4652
cp ldk-c-bindings/ldk-net/ldk_net.h ci/LDKCHeaders/Headers/
4753
- name: Fix header files
4854
run: |
4955
python ci/fix_header_includes.py
50-
- name: Copy Swift bindings into sources
51-
run: |
52-
cp -a bindings/LDK/. ci/LDKSwift/Sources/LDKSwift
53-
cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
5456
- name: Build and test bindings
5557
run: |
5658
cd ci/LDKSwift

0 commit comments

Comments
 (0)