Skip to content

Commit 1213377

Browse files
ci: switch out from ubuntu 20.04 (#1184)
* ci: use ubuntu-latest for coverage (#1141) * ci: pass --keep-going to lcov and genhtml (#1141) * ci: use ubuntu-22.04 for release workflow (#1141) * ci: install gcc-14 on linux (#1141) * chore: bump nim-leveldbstatic to 0.2.1
1 parent e9c6d19 commit 1213377

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

.github/actions/nimbus-build-system/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,16 @@ runs:
9292
if : ${{ inputs.os == 'linux' && inputs.coverage != 'true' }}
9393
shell: ${{ inputs.shell }} {0}
9494
run: |
95-
# Add GCC-14 to alternatives
96-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
97-
# Set GCC-14 as the default
98-
sudo update-alternatives --set gcc /usr/bin/gcc-14
95+
# Skip for older Ubuntu versions
96+
if [[ $(lsb_release -r | awk -F '[^0-9]+' '{print $2}') -ge 24 ]]; then
97+
# Install GCC-14
98+
sudo apt-get update -qq
99+
sudo apt-get install -yq gcc-14
100+
# Add GCC-14 to alternatives
101+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
102+
# Set GCC-14 as the default
103+
sudo update-alternatives --set gcc /usr/bin/gcc-14
104+
fi
99105
100106
- name: Install ccache on Linux/Mac
101107
if: inputs.os == 'linux' || inputs.os == 'macos'

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ jobs:
6161
suggest: true
6262

6363
coverage:
64-
# Force to stick to ubuntu 20.04 for coverage because
65-
# lcov was updated to 2.x version in ubuntu-latest
66-
# and cause a lot of issues.
67-
# See https://github.com/linux-test-project/lcov/issues/238
68-
runs-on: ubuntu-20.04
64+
runs-on: ubuntu-latest
6965
steps:
7066
- name: Checkout sources
7167
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: fabiocaccamo/create-matrix-action@v5
2929
with:
3030
matrix: |
31-
os {linux}, cpu {amd64}, builder {ubuntu-20.04}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
31+
os {linux}, cpu {amd64}, builder {ubuntu-22.04}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
3232
os {linux}, cpu {arm64}, builder {ubuntu-22.04-arm}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
3333
os {macos}, cpu {amd64}, builder {macos-13}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
3434
os {macos}, cpu {arm64}, builder {macos-14}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ coverage:
179179
$(MAKE) NIMFLAGS="$(NIMFLAGS) --lineDir:on --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage" test
180180
cd nimcache/release/testCodex && rm -f *.c
181181
mkdir -p coverage
182-
lcov --capture --directory nimcache/release/testCodex --output-file coverage/coverage.info
182+
lcov --capture --keep-going --directory nimcache/release/testCodex --output-file coverage/coverage.info
183183
shopt -s globstar && ls $$(pwd)/codex/{*,**/*}.nim
184-
shopt -s globstar && lcov --extract coverage/coverage.info $$(pwd)/codex/{*,**/*}.nim --output-file coverage/coverage.f.info
184+
shopt -s globstar && lcov --extract coverage/coverage.info --keep-going $$(pwd)/codex/{*,**/*}.nim --output-file coverage/coverage.f.info
185185
echo -e $(BUILD_MSG) "coverage/report/index.html"
186-
genhtml coverage/coverage.f.info --output-directory coverage/report
186+
genhtml coverage/coverage.f.info --keep-going --output-directory coverage/report
187187

188188
show-coverage:
189189
if which open >/dev/null; then (echo -e "\e[92mOpening\e[39m HTML coverage report in browser..." && open coverage/report/index.html) || true; fi

build.nims

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ task coverage, "generates code coverage report":
107107
mkDir("coverage")
108108
echo " ======== Running LCOV ======== "
109109
exec(
110-
"lcov --capture --directory nimcache/coverage --output-file coverage/coverage.info"
110+
"lcov --capture --keep-going --directory nimcache/coverage --output-file coverage/coverage.info"
111111
)
112112
exec(
113-
"lcov --extract coverage/coverage.info --output-file coverage/coverage.f.info " &
113+
"lcov --extract coverage/coverage.info --keep-going --output-file coverage/coverage.f.info " &
114114
nimSrcs
115115
)
116116
echo " ======== Generating HTML coverage report ======== "
117-
exec("genhtml coverage/coverage.f.info --output-directory coverage/report ")
117+
exec("genhtml coverage/coverage.f.info --keep-going --output-directory coverage/report ")
118118
echo " ======== Coverage report Done ======== "
119119

120120
task showCoverage, "open coverage html":

0 commit comments

Comments
 (0)