53 Commits

Author SHA1 Message Date
Etan Kissling
3866a8ab98
remove Nim-csources-v1 and nimble checkouts (#75)
When `build_nim.sh` detects that `skipIntegrityCheck` is supported,
it runs the upstream toolchain for building Nim, ignoring the locally
checked out `Nim-csources-v1` and `nimble` sub-repositories. So, having
those repos checked out is not useful in that scenario.

When `skipIntegrityCheck` is unsupported, `build_nim.sh` uses the local
sub-repositories if they are available. But, it also clones them if they
are unavailable using commits as specified by environment variables.
Because the clone will happen as part of the script, having the repos
linked as sub-repositories is also not useful. Even worse, if the script
has different commit hashes than the subrepository, the behaviour is
different depending on whether `build_nim.sh` is run before or after
the submodules are checked out.

Therefore, we can remove the `Nim-csources-v1` and `nimble` sub-repos,
using the upstream build system if available, or the hardcoded commits
inside `build_nim.sh` to have a manual build, as before.

Also moves the various variables that control the used versions into
the manual section to emphasize that these only take effect in manual
mode, but not when using upstream build system (`skipIntegrityCheck`).

If one wants to use a custom `Nimble` version, fork `Nim` and adjust the
config in that fork. That also works with the upstream build system.
2024-01-15 16:21:06 +01:00
Etan Kissling
c01eb708bc
adjust CSOURCES_V1_COMMIT variable with recent bump (#73) (#74)
Forgot to update the ref in the build script to actually use the new
commit. Do that now.
2024-01-15 15:51:12 +01:00
Etan Kissling
239c3a7fbb
install Nimble CA cert when skipIntegrityCheck (#62)
In #61 a regression was introduced where Nimble fails to build packages.

```
    Prompt: No local packages.json found, download it from internet? -> [forced yes]
Downloading Official package list
       Tip: 6 messages have been suppressed, use --verbose to show them.
     Error: Refresh failed
        ... Could not download: No SSL/TLS CA certificates found.
Error: Process completed with exit code 1.
```

Ensure that CA cert is being downloaded once more, even when `koch`
supports `skipIntegrityCheck`.
2023-06-09 20:26:55 +02:00
markspanbroek
17d85dac6f
Fix checking out of recent Nim tags in shallow repo (#58)
* Fix checking out of recent Nim tags in shallow repo

When calling `git fetch` on a shallow repo, recent
tags or commits are refused. Fetching with `--tags`
ensures that the latest tags and the commits that
they point to are fetched.

More info:
https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---update-shallow

Co-authored-by: Tanguy <tanguy@status.im>
2023-06-07 12:36:06 +02:00
Tanguy
cb65dbcd80
Use upstream build system when possible (#61) 2023-05-22 15:55:06 +02:00
Tanguy
72d51e4c32
Fix windows CI building (#56)
Linking doesn't work properly on github actions windows machines
2023-01-12 13:38:06 +01:00
Tanguy
c488f87b09
Automatic csources selection (#55) 2023-01-05 10:40:49 +01:00
Ștefan Talpalaru
a8ab2dc39a
build_nim.sh: hide stderr from "ls" (#43) 2022-03-18 21:09:01 +01:00
Ștefan Talpalaru
041544c2b7
build_nim.sh: fix "cacert.pem" corner case (#42) 2022-03-18 10:29:00 +01:00
Ștefan Talpalaru
8377eed7c0
build_nim.sh: limit the number of Nim binaries (#41)
The most recent 10 compiler binaries should be enough for everyone.
2022-03-18 10:21:21 +01:00
Ștefan Talpalaru
f62fa395f7
build_nim.sh: handle manual symlink deletion (#39) 2022-01-26 11:54:34 +01:00
Ștefan Talpalaru
b4ae7bbc92
hide some annoying stderr (#32) 2021-12-08 13:20:56 +01:00
Ștefan Talpalaru
8d226580a0
build_nim.sh: don't set a default NIM_COMMIT value
Targeting a branch doesn't work, when it's a submodule pointing to an
older commit that we're dealing with.
2021-11-10 09:46:43 +01:00
Ștefan Talpalaru
15bc75d4cf QUICK_AND_DIRTY_NIMBLE 2021-09-07 18:28:47 +03:00
Ștefan Talpalaru
7897dfe46c
deal w/ a diverged local branch where a ff merge is not possible 2021-07-30 21:34:43 +02:00
Ștefan Talpalaru
0e709abc28
build_nim.sh: deal with old local branches used as Nim targets (#23) 2021-07-30 01:12:26 +02:00
Ștefan Talpalaru
a1da1f403d
don't build csources twice on Nim devel 2021-06-17 04:52:02 +02:00
Ștefan Talpalaru
77747657f6
support old Git versions, like the one from Ubuntu-18.04 2021-05-25 19:51:12 +02:00
Ștefan Talpalaru
e125ec9a51
build_nim.sh: change csources repo
Nim devel no longer builds with the old one
2021-05-22 17:13:58 +02:00
Ștefan Talpalaru
8758242198
build_nim.sh: update "last_built_commit" 2021-05-22 04:44:06 +02:00
Ștefan Talpalaru
12c3591fc1
speculative fix 2021-05-05 12:25:14 +02:00
Ștefan Talpalaru
38e81f10d3
Windows: the "nim" symlinks lacked a suffix 2021-04-29 13:22:35 +02:00
Ștefan Talpalaru
47b4317888
deal with local modifications in the working copy 2021-04-29 01:31:35 +02:00
Ștefan Talpalaru
135e43468f
add an upstream remote to the Status Nim fork repo
and fix the Nimble commit that went missing upstream at some point
2021-04-29 01:07:25 +02:00
Ștefan Talpalaru
7d418e44da move from timestamps to commit hashes
This allows a faster path for the most common scenario and avoiding a
hard link that probably doesn't work on Windows.
2021-04-28 18:00:44 +03:00
Zahary Karadjov
dc8e54b1e9 Allow the user to specify the Nim version in an ENV variable 2021-04-28 18:00:44 +03:00
Ștefan Talpalaru
820aeaec8e
download CA cert for Nimble 2021-02-26 01:34:21 +01:00
Ștefan Talpalaru
316f033bad
Nim-1.2.10 2021-02-23 20:53:00 +01:00
Ștefan Talpalaru
17aeb26a24
comment 2021-02-11 02:15:06 +01:00
Ștefan Talpalaru
98b580a00e
QUICK_AND_DIRTY_COMPILER: add a bootstrap iteration 2021-01-10 22:53:15 +01:00
Ștefan Talpalaru
f7c732a150 new variable: QUICK_AND_DIRTY_COMPILER
Don't re-build the Nim compiler multiple times until we get identical
binaries, like "build_all.sh" does. Don't build any tools either.

Disabled by default, useful in CI.
2021-01-06 14:54:31 +02:00
Ștefan Talpalaru
79469de156
libnatpmp.a: use CFLAGS from the environment 2020-09-22 19:32:19 +02:00
Mamy André-Ratsimbazafy
525772599d
support Linux 32-bit builds 2020-09-18 19:51:17 +02:00
Jakub
384264142c
use env bash shebangs for portability (#11)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-13 15:37:57 +02:00
Ștefan Talpalaru
077cba3487
build_nim.sh: quiet Git cloning 2020-06-19 00:46:22 +02:00
Ștefan Talpalaru
ae49e03af6
Merge branch 'Nim-1-2-2' 2020-06-17 14:23:02 +02:00
Ștefan Talpalaru
a662777d03
document the scripts 2020-06-14 19:12:27 +02:00
Ștefan Talpalaru
c2f9ac62f4
Nim-1.2.2-RC2 2020-06-03 14:47:27 +02:00
Ștefan Talpalaru
89709a0913
add comments 2020-05-01 15:10:44 +02:00
Ștefan Talpalaru
6a32811ebd
AppVeyor's Git is using a strftime() that doesn't support %s 2020-04-30 22:27:55 +02:00
Ștefan Talpalaru
c8278c4ca4
"--date:unix" -> "--date=format-local:%s"
- "--date:unix" was introduced in Git 2.9.4, while
  "--date=format-local:..." appeared in 2.7.0
2020-04-30 16:58:16 +02:00
Ștefan Talpalaru
2c4faa5372
"--skipUserCfg --skipParentCfg" does the trick 2020-02-12 01:40:41 +01:00
Ștefan Talpalaru
9bf2fc264c
more debugging 2020-02-12 01:27:15 +01:00
Ștefan Talpalaru
cc48d62c22
more verbosity 2020-02-12 01:11:00 +01:00
Ștefan Talpalaru
5c9585b004
add "-d:disableMarchNative" to "koch boot" 2020-02-12 00:36:19 +01:00
Ștefan Talpalaru
6cfabf7820
disable warnings/hints when building the compiler
fixes https://github.com/status-im/nimbus-build-system/issues/4
2019-12-03 17:16:24 +01:00
Ștefan Talpalaru
351b68fd94
fix logical error 2019-10-29 15:57:26 +01:00
Ștefan Talpalaru
15f531200e
Merge branch 'master' into nim_v1 2019-10-28 21:05:44 +01:00
Ștefan Talpalaru
dee348f0fa
build_nim.sh: bump csources and Nimble target commits
so they work with the latest Nim in https://github.com/status-im/Nim
("use the latest...") strategy employed by projects other than Nimbus
and nim-beacon-chain
2019-10-23 22:38:02 +02:00
Ștefan Talpalaru
6261b66a25
build_nim.sh: also rebuild when the compiled commit is newer
than the last Nim repo commit (useful when switching branches)
2019-10-02 14:51:39 +02:00