Update CI to work around missing version.rs
[ldk-c-bindings] / .github / workflows / build.yml
index 9511edfbc321ad99541403a8567b7b037af8639f..b64b7c09c5d4b6e6b20500bfdaa0487be3965a1c 100644 (file)
@@ -15,18 +15,25 @@ jobs:
         run: |
           apt-get update
           apt-get -y dist-upgrade
-          apt-get -y install cargo valgrind lld git g++ clang
+          apt-get -y install cargo libstd-rust-dev-wasm32 valgrind lld git g++ clang
       - name: Checkout source code
         uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
       - name: Sanity test bindings against Cargo.toml RL
         working-directory: lightning-c-bindings
-        run: cargo check
+        run: |
+          # Note that the version tags aren't checked into git
+          touch src/version.rs
+          cargo check
       - name: Install cbindgen
         run: cargo install --force cbindgen
       - name: Checkout Rust-Lightning git
         run: git clone https://github.com/rust-bitcoin/rust-lightning
+      - name: Rebuild bindings without std, and check the sample app builds + links
+        run: ./genbindings.sh ./rust-lightning false
       - name: Rebuild bindings, and check the sample app builds + links
-        run: ./genbindings.sh ./rust-lightning
+        run: ./genbindings.sh ./rust-lightning true
       - name: Check that the latest bindings are in git
         run: |
           git checkout lightning-c-bindings/Cargo.toml # genbindings edits this to update the path