-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore/update nim version #1052
Chore/update nim version #1052
Changes from 37 commits
b5af96f
ca2b63c
ef3274b
34f5e00
7c9b607
0e00f0c
0ecf3f7
4935494
a1c8c94
599e868
a2f0528
a2f09b2
902c6dc
83b4943
daadffe
d6b1781
0724d7f
6ad496d
5c80a84
6b64c25
627e6ae
51a4054
ab39da8
3f9f421
d2388a3
b9222d0
d9eca3b
696f66d
56d2186
1ecad68
7bdbd87
dfcdac6
f24d264
fdba4e7
251d286
b5848da
801f6b7
2c436db
958df72
08ced59
00e3f0e
10bc903
66d1c5b
943ca8a
fb14b60
5cbb43b
0d71b0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ inputs: | |
default: "amd64" | ||
nim_version: | ||
description: "Nim version" | ||
default: "version-1-6" | ||
default: "v2.0.14" | ||
rust_version: | ||
description: "Rust version" | ||
default: "1.79.0" | ||
|
@@ -31,17 +31,17 @@ runs: | |
if: inputs.os == 'linux' && (inputs.cpu == 'amd64' || inputs.cpu == 'arm64') | ||
shell: ${{ inputs.shell }} {0} | ||
run: | | ||
sudo apt-fast update -qq | ||
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \ | ||
sudo apt-get update -qq | ||
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \ | ||
--no-install-recommends -yq lcov | ||
- name: APT (Linux i386) | ||
if: inputs.os == 'linux' && inputs.cpu == 'i386' | ||
shell: ${{ inputs.shell }} {0} | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-fast update -qq | ||
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \ | ||
sudo apt-get update -qq | ||
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \ | ||
--no-install-recommends -yq gcc-multilib g++-multilib | ||
- name: Homebrew (macOS) | ||
|
@@ -78,11 +78,21 @@ runs: | |
mingw-w64-i686-ntldd-git | ||
mingw-w64-i686-rust | ||
- name: MSYS2 (Windows All) - Downgrade to gcc 13 | ||
- name: MSYS2 (Windows All) - Update to gcc 14 | ||
if: inputs.os == 'windows' | ||
shell: ${{ inputs.shell }} {0} | ||
run: | | ||
pacman -U --noconfirm https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-13.2.0-6-any.pkg.tar.zst https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-libs-13.2.0-6-any.pkg.tar.zst | ||
pacman -U --noconfirm https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-14.2.0-2-any.pkg.tar.zst https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-libs-14.2.0-2-any.pkg.tar.zst | ||
- name: Install gcc 14 on Linux | ||
# We don't want to install gcc 14 for coverage (Ubuntu 20.04) | ||
if : ${{ inputs.os == 'linux' && !inputs.coverage }} | ||
shell: ${{ inputs.shell }} {0} | ||
run: | | ||
# Add GCC-14 to alternatives | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 | ||
# Set GCC-14 as the default | ||
sudo update-alternatives --set gcc /usr/bin/gcc-14 | ||
- name: Derive environment variables | ||
shell: ${{ inputs.shell }} {0} | ||
|
@@ -159,6 +169,7 @@ runs: | |
- name: Restore Nim toolchain binaries from cache | ||
id: nim-cache | ||
uses: actions/cache@v4 | ||
if : ${{ !inputs.coverage }} | ||
with: | ||
path: NimBinaries | ||
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-${{ inputs.nim_version }}-cache-${{ env.cache_nonce }}-${{ github.run_id }} | ||
|
@@ -168,9 +179,16 @@ runs: | |
shell: ${{ inputs.shell }} {0} | ||
run: echo "NIM_COMMIT=${{ inputs.nim_version }}" >> ${GITHUB_ENV} | ||
|
||
- name: MSYS2 (Windows All) - Disable git symbolic links (since miniupnp 2.2.5) | ||
if: inputs.os == 'windows' | ||
shell: ${{ inputs.shell }} {0} | ||
run: | | ||
git config --global core.symlinks false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @veaceslavdoina Double check if it is okay for you |
||
- name: Build Nim and Codex dependencies | ||
shell: ${{ inputs.shell }} {0} | ||
run: | | ||
gcc --version | ||
make -j${ncpu} CI_CACHE=NimBinaries ${ARCH_OVERRIDE} QUICK_AND_DIRTY_COMPILER=1 update | ||
echo | ||
./env.sh nim --version |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ jobs: | |
os: ${{ matrix.os }} | ||
shell: ${{ matrix.shell }} | ||
nim_version: ${{ matrix.nim_version }} | ||
coverage: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add an input https://github.com/codex-storage/nim-codex/actions/runs/12689785802 |
||
|
||
## Part 1 Tests ## | ||
- name: Unit tests | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
|
||
env: | ||
cache_nonce: 0 # Allows for easily busting actions/cache caches | ||
nim_version: pinned | ||
nim_version: v2.0.14 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
|
@@ -27,10 +27,10 @@ jobs: | |
uses: fabiocaccamo/create-matrix-action@v4 | ||
with: | ||
matrix: | | ||
os {linux}, cpu {amd64}, builder {ubuntu-20.04}, tests {unittest}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {linux}, cpu {amd64}, builder {ubuntu-20.04}, tests {contract}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {linux}, cpu {amd64}, builder {ubuntu-20.04}, tests {integration}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {linux}, cpu {amd64}, builder {ubuntu-20.04}, tests {tools}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {linux}, cpu {amd64}, builder {ubuntu-latest}, tests {unittest}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We switched to Probably we should stick with the 20.04? Btw, we also have a release workflow and There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There are two problems: 1- 20.04 will be deprecated soon, 2- I am not sure I will be able to install GCC 14 on ubuntu 20.04. Maybe #932 is fixed now with the update to Nim 2. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was related to the glibc version. So, new releases will not run on old distributions.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is what we discussed yesterday. |
||
os {linux}, cpu {amd64}, builder {ubuntu-latest}, tests {contract}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {linux}, cpu {amd64}, builder {ubuntu-latest}, tests {integration}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {linux}, cpu {amd64}, builder {ubuntu-latest}, tests {tools}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {macos}, cpu {amd64}, builder {macos-13}, tests {unittest}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {macos}, cpu {amd64}, builder {macos-13}, tests {contract}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
os {macos}, cpu {amd64}, builder {macos-13}, tests {integration}, nim_version {${{ env.nim_version }}}, shell {bash --noprofile --norc -e -o pipefail} | ||
|
@@ -48,6 +48,10 @@ jobs: | |
cache_nonce: ${{ needs.matrix.outputs.cache_nonce }} | ||
|
||
coverage: | ||
# Force to stick to ubuntu 20.04 for coverage because | ||
# lcov was updated to 2.x version in ubuntu-latest | ||
# and cause a lot of issues. | ||
# See https://github.com/linux-test-project/lcov/issues/238 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout sources | ||
|
@@ -61,6 +65,7 @@ jobs: | |
with: | ||
os: linux | ||
nim_version: ${{ env.nim_version }} | ||
coverage: true | ||
|
||
- name: Generate coverage data | ||
run: | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows is installing latest GCC version, which currently is 14 and 15 is on the way :)
We can remove this step, but later we might have an issue with version 15 (?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Windows 2025 right ?
But the windows-latest is still pointing on windows-2022 which is using gcc 12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not relying on the preinstalled GCC on Windows. It is about MSYS2 and how it works
At some point, it will just install latest GCC and version 15 will be released in March~April (#875 (comment)). It will appear in MSYS2 repository with a delay and we can expect an issue in August, as we had it with the version 14 😄
So, if we remove that step, we can get in the the issue in August, but will have latest GCC releases all the time.
Let's leave it to have a stable CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok.
Yeah I agree. I prefer to leave it for now and after testing GCC 15, we could remove it.