Skip to content

Commit d4f5bbf

Browse files
committed
ci: print version information during build
1 parent 7a4f8f6 commit d4f5bbf

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ jobs:
6363
- name: Install ccache, ninja (Linux)
6464
run: sudo apt install ccache ninja-build
6565
if: matrix.os == 'ubuntu-latest'
66+
- name: Print version info
67+
run: ./version.py dump
6668
- name: Build
6769
run: NINJA_FLAGS=-v make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON
6870
shell: bash
@@ -111,6 +113,8 @@ jobs:
111113
with:
112114
fetch-depth: 0
113115
- run: git submodule update --init --depth 32 --jobs 3
116+
- name: Print version info
117+
run: python3 ./version.py dump
114118
- name: Build
115119
shell: msys2 {0}
116120
run: |
@@ -165,6 +169,8 @@ jobs:
165169
type=ref,event=pr
166170
type=sha
167171
172+
- name: Print version info
173+
run: ./version.py dump
168174
- name: Run docker_build script
169175
run: ./docker_build.sh
170176
- name: Upload artifacts

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
ROOT_DIR=${CURDIR}
55
LLVM_PROJ_DIR?=$(ROOT_DIR)/src/llvm-project
6+
VERSION_SCRIPT=python3 ./version.py
67

78
# Windows needs munging
89
ifeq ($(OS),Windows_NT)
@@ -43,8 +44,8 @@ override LLVM_CMAKE_FLAGS += -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
4344
endif
4445

4546
# Only the major version is needed for Clang, see https://reviews.llvm.org/D125860.
46-
CLANG_VERSION=$(shell $(BASH) ./version.py llvm-major --llvm-dir=$(LLVM_PROJ_DIR))
47-
VERSION:=$(shell $(BASH) ./version.py)
47+
CLANG_VERSION=$(shell $(VERSION_SCRIPT) llvm-major --llvm-dir=$(LLVM_PROJ_DIR))
48+
VERSION:=$(shell $(VERSION_SCRIPT))
4849
DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION)
4950

5051
default: build
@@ -241,7 +242,7 @@ build/config.BUILT:
241242
touch build/config.BUILT
242243

243244
build/version.BUILT:
244-
./version.py dump > $(BUILD_PREFIX)/VERSION
245+
$(VERSION_SCRIPT) dump > $(BUILD_PREFIX)/VERSION
245246
touch build/version.BUILT
246247

247248
build: build/llvm.BUILT build/wasi-libc.BUILT build/compiler-rt.BUILT build/libcxx.BUILT build/config.BUILT build/version.BUILT

0 commit comments

Comments
 (0)