"solang --version" does not work for CI binaries
By default, actions/checkout@v2 does a clone with --depth 1, so no tags
etc are cloned. As a result, "git describe --tags" does not work, which
is used by build.rs to generate GIT_HASH env. That env is used by
solang --version.
@@ -21,7 +21,9 @@ jobs:
container: hyperledgerlabs/solang:ci
steps:
- name: Checkout sources
- uses: actions/checkout@v2
+ # Make sure "git describe --tags" works for solang --version
+ # checkout@v2 requires git 2.18 or higher, which is not in our image
+ uses: actions/checkout@v1
- name: Rust stable
run: rustup default stable
- name: Compile stdlib
@@ -42,6 +44,9 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
+ with:
+ # Make sure "git describe --tags" works for solang --version
+ fetch-depth: 0
- name: Download LLVM
run: curl -sS -o c:\llvm.zip https://solang.io/download/llvm10.0-win.zip
- name: Extract LLVM
@@ -66,6 +71,9 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
+ with:
+ # Make sure "git describe --tags" works for solang --version
+ fetch-depth: 0
- name: Download LLVM
run: curl -sS -o llvm10.0-mac.tar.gz https://solang.io/download/llvm10.0-mac.tar.gz
- name: Extract LLVM
