From e9ddcd83f212d657d2de8bf951d773ea8b6410a6 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sun, 29 Sep 2019 20:41:33 +0300 Subject: [PATCH 1/6] Nim v1.0.0 --- vendor/Nim | 2 +- vendor/Nim-csources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/Nim b/vendor/Nim index c6f601d..f7a8fc4 160000 --- a/vendor/Nim +++ b/vendor/Nim @@ -1 +1 @@ -Subproject commit c6f601d48ec81e0d6e052ba0d19a195b55cc68f2 +Subproject commit f7a8fc46c0012033917582eb740dc0343c093e35 diff --git a/vendor/Nim-csources b/vendor/Nim-csources index b56e49b..f72f471 160000 --- a/vendor/Nim-csources +++ b/vendor/Nim-csources @@ -1 +1 @@ -Subproject commit b56e49bbedf62db22eb26388f98262e2948b2cbc +Subproject commit f72f471adb743bea4f8d8c59d19aa1cb885dcc59 From 6b4fed06ac8cf10f6358c91475dccac47ba03353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Mon, 30 Sep 2019 03:40:12 +0200 Subject: [PATCH 2/6] build_nim.sh: store a timestamp in a separate file --- scripts/build_nim.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/scripts/build_nim.sh b/scripts/build_nim.sh index 3265191..897c5cf 100755 --- a/scripts/build_nim.sh +++ b/scripts/build_nim.sh @@ -11,8 +11,8 @@ set -e # Git commits -CSOURCES_COMMIT="b56e49bbedf62db22eb26388f98262e2948b2cbc" # 0.19.0 -NIMBLE_COMMIT="c8d79fc0228682677330a9f57d14389aaa641153" # Mar 26 10:06:06 2019 +CSOURCES_COMMIT="f72f471adb743bea4f8d8c59d19aa1cb885dcc59" # 0.20.0 +NIMBLE_COMMIT="d15c8530cb7480ce39ffa85a2dd9819d2d4fc645" # 0.10.2 # script arguments [[ $# -ne 4 ]] && { echo "usage: $0 nim_dir csources_dir nimble_dir ci_cache_dir"; exit 1; } @@ -40,12 +40,6 @@ else ON_WINDOWS=0 EXE_SUFFIX="" fi -# macOS -if uname | grep -qi "darwin"; then - STAT_FORMAT="-f %m" -else - STAT_FORMAT="-c %Y" -fi NIM_BINARY="${NIM_DIR}/bin/nim${EXE_SUFFIX}" @@ -61,8 +55,8 @@ nim_needs_rebuilding() { cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/ || true # let this one fail with an empty cache dir fi - # compare binary mtime to the date of the last commit (keep in mind that Git doesn't preserve file timestamps) - if [[ -e "$NIM_BINARY" && $(stat $STAT_FORMAT "$NIM_BINARY") -gt $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then + # compare the built commit's timestamp to the date of the last commit (keep in mind that Git doesn't preserve file timestamps) + if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -ge $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then return $NO_REBUILD else return $REBUILD @@ -126,6 +120,9 @@ build_nim() { sh build_all_custom.sh rm build_all_custom.sh + # record the last commit's timestamp + git log --pretty=format:%cd -n 1 --date=unix > bin/timestamp + # update the CI cache popd # we were in $NIM_DIR if [[ -n "$CI_CACHE" ]]; then From 9370c2bc58f4bd941b0bf0bb4606b50191a3d668 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 1 Oct 2019 18:00:46 +0300 Subject: [PATCH 3/6] Switch to Nim 1.0.2 RC --- vendor/Nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/Nim b/vendor/Nim index f7a8fc4..2545f9e 160000 --- a/vendor/Nim +++ b/vendor/Nim @@ -1 +1 @@ -Subproject commit f7a8fc46c0012033917582eb740dc0343c093e35 +Subproject commit 2545f9e7c230b0b4e923617425bc65998c74039f From 6261b66a25ae457864dbd6657d27dedf191b0754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 2 Oct 2019 14:51:39 +0200 Subject: [PATCH 4/6] build_nim.sh: also rebuild when the compiled commit is newer than the last Nim repo commit (useful when switching branches) --- scripts/build_nim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_nim.sh b/scripts/build_nim.sh index 897c5cf..be2623a 100755 --- a/scripts/build_nim.sh +++ b/scripts/build_nim.sh @@ -56,7 +56,7 @@ nim_needs_rebuilding() { fi # compare the built commit's timestamp to the date of the last commit (keep in mind that Git doesn't preserve file timestamps) - if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -ge $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then + if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -ne $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then return $NO_REBUILD else return $REBUILD From c29bc8342c5ec2ffb87310460246f4de953ba933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Tue, 15 Oct 2019 18:29:35 +0200 Subject: [PATCH 5/6] bump vendor/Nim --- makefiles/targets.mk | 2 +- vendor/Nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/makefiles/targets.mk b/makefiles/targets.mk index 8754cad..a7400f7 100644 --- a/makefiles/targets.mk +++ b/makefiles/targets.mk @@ -98,7 +98,7 @@ $(NIMBLE_DIR): | $(NIM_BINARY) git submodule foreach --quiet '$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nimble_link.sh "$$sm_path"' clean-common: - rm -rf build/{*.exe,*.so,*.so.0} vendor/go/bin $(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/nimcache nimcache + rm -rf build/{*.exe,*.so,*.so.0} vendor/go/bin $(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/bin/timestamp $(NIM_DIR)/nimcache nimcache + [[ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc ]] && $(MAKE) -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc clean $(HANDLE_OUTPUT) || true + [[ -e vendor/nim-nat-traversal/vendor/libnatpmp ]] && $(MAKE) -C vendor/nim-nat-traversal/vendor/libnatpmp clean $(HANDLE_OUTPUT) || true diff --git a/vendor/Nim b/vendor/Nim index 2545f9e..f16bb4d 160000 --- a/vendor/Nim +++ b/vendor/Nim @@ -1 +1 @@ -Subproject commit 2545f9e7c230b0b4e923617425bc65998c74039f +Subproject commit f16bb4d85b724f03b41c4dd104b439fa96c2fda4 From 733e719a589a9bfcb576046923c5334af1825d77 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Wed, 23 Oct 2019 15:13:30 +0300 Subject: [PATCH 6/6] Nim v1.0.2 --- vendor/Nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/Nim b/vendor/Nim index f16bb4d..193b3c6 160000 --- a/vendor/Nim +++ b/vendor/Nim @@ -1 +1 @@ -Subproject commit f16bb4d85b724f03b41c4dd104b439fa96c2fda4 +Subproject commit 193b3c66bbeffafaebff166d24b9866f1eaaac0e