Skip to content

Commit 66585e2

Browse files
narimirantersec
andauthoredSep 30, 2024··
update ci.yml to test Nim 2.2; also test gcc-14 (#42)
* update ci.yml to test Nim 2.2; also test gcc-14 * stop testing C++ backend * disable unused x86-only rdtsc reading function --------- Co-authored-by: tersec <tersec@users.noreply.github.com>
1 parent d4c4313 commit 66585e2

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed
 

‎.github/workflows/ci.yml

+32-9
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,39 @@ jobs:
1919
target:
2020
- os: linux
2121
cpu: amd64
22+
- os: linux-gcc-14 # This is to use ubuntu 24 and install gcc 14. Should be removed when ubuntu-latest is 26.04
23+
cpu: amd64
2224
- os: linux
2325
cpu: i386
2426
- os: macos
2527
cpu: amd64
28+
- os: macos
29+
cpu: arm64
2630
- os: windows
2731
cpu: amd64
28-
#- os: windows
29-
#cpu: i386
30-
branch: [version-1-6, version-2-0, devel]
32+
branch: [version-2-0, version-2-2, devel]
3133
include:
3234
- target:
3335
os: linux
34-
builder: ubuntu-20.04
36+
builder: ubuntu-latest
37+
shell: bash
38+
- target:
39+
os: linux-gcc-14 # This is to use ubuntu 24 and install gcc 14. Should be removed when ubuntu-latest is 26.04
40+
builder: ubuntu-24.04
3541
shell: bash
3642
- target:
3743
os: macos
38-
builder: macos-12
44+
cpu: amd64
45+
builder: macos-13
46+
shell: bash
47+
- target:
48+
os: macos
49+
cpu: arm64
50+
builder: macos-latest
3951
shell: bash
4052
- target:
4153
os: windows
42-
builder: windows-2019
54+
builder: windows-latest
4355
shell: msys2 {0}
4456

4557
defaults:
@@ -51,7 +63,7 @@ jobs:
5163
continue-on-error: ${{ matrix.branch == 'devel' }}
5264
steps:
5365
- name: Checkout
54-
uses: actions/checkout@v3
66+
uses: actions/checkout@v4
5567

5668
- name: Install build dependencies (Linux i386)
5769
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
@@ -97,7 +109,7 @@ jobs:
97109
- name: Restore Nim DLLs dependencies (Windows) from cache
98110
if: runner.os == 'Windows'
99111
id: windows-dlls-cache
100-
uses: actions/cache@v2
112+
uses: actions/cache@v4
101113
with:
102114
path: external/dlls-${{ matrix.target.cpu }}
103115
key: 'dlls-${{ matrix.target.cpu }}'
@@ -121,6 +133,8 @@ jobs:
121133
run: |
122134
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
123135
PLATFORM=x64
136+
elif [[ '${{ matrix.target.cpu }}' == 'arm64' ]]; then
137+
PLATFORM=arm64
124138
else
125139
PLATFORM=x86
126140
fi
@@ -152,10 +166,19 @@ jobs:
152166
bash build_nim.sh nim csources dist/nimble NimBinaries
153167
echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH
154168
169+
- name: Use gcc 14
170+
# Should be removed when ubuntu-latest is 26.04
171+
if : ${{ matrix.target.os == 'linux-gcc-14' }}
172+
run: |
173+
# Add GCC-14 to alternatives
174+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
175+
# Set GCC-14 as the default
176+
sudo update-alternatives --set gcc /usr/bin/gcc-14
177+
155178
- name: Run tests
156179
run: |
157180
nim --version
158181
nimble --version
182+
gcc --version
159183
nimble install -y --depsOnly
160184
env NIMLANG=c nimble test
161-
env NIMLANG=cpp nimble test

‎benchmarks/wtime.h

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static inline double Wtime_usec(void)
2828
return tv.tv_sec * 1e6 + tv.tv_usec;
2929
}
3030

31+
#if 0
3132
// Read time stamp counter on x86
3233
static inline unsigned long long readtsc(void)
3334
{
@@ -36,6 +37,7 @@ static inline unsigned long long readtsc(void)
3637
asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
3738
return (unsigned long long)hi << 32 | lo;
3839
}
40+
#endif
3941

4042
#define WTIME_unique_var_name_paste(id, n) id ## n
4143
#define WTIME_unique_var_name(id, n) WTIME_unique_var_name_paste(id, n)

‎taskpools.nimble

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ proc build(args, path: string) =
2525
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
2626

2727
proc run(args, path: string) =
28-
build args & " -r", path
28+
build args & " --mm:refc -r", path
2929
if (NimMajor, NimMinor) > (1, 6):
30-
build args & " --mm:refc -r", path
30+
build args & " --mm:orc -r", path
3131

3232
task test, "Run Taskpools tests":
3333
# Internal data structures

0 commit comments

Comments
 (0)
Please sign in to comment.