mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-04 06:23:06 +00:00
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
This commit is contained in:
parent
e9c6d19873
commit
1213377ac4
14
.github/actions/nimbus-build-system/action.yml
vendored
14
.github/actions/nimbus-build-system/action.yml
vendored
@ -92,10 +92,16 @@ runs:
|
|||||||
if : ${{ inputs.os == 'linux' && inputs.coverage != 'true' }}
|
if : ${{ inputs.os == 'linux' && inputs.coverage != 'true' }}
|
||||||
shell: ${{ inputs.shell }} {0}
|
shell: ${{ inputs.shell }} {0}
|
||||||
run: |
|
run: |
|
||||||
# Add GCC-14 to alternatives
|
# Skip for older Ubuntu versions
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
|
if [[ $(lsb_release -r | awk -F '[^0-9]+' '{print $2}') -ge 24 ]]; then
|
||||||
# Set GCC-14 as the default
|
# Install GCC-14
|
||||||
sudo update-alternatives --set gcc /usr/bin/gcc-14
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -yq gcc-14
|
||||||
|
# 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
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install ccache on Linux/Mac
|
- name: Install ccache on Linux/Mac
|
||||||
if: inputs.os == 'linux' || inputs.os == 'macos'
|
if: inputs.os == 'linux' || inputs.os == 'macos'
|
||||||
|
|||||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -61,11 +61,7 @@ jobs:
|
|||||||
suggest: true
|
suggest: true
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
# Force to stick to ubuntu 20.04 for coverage because
|
runs-on: ubuntu-latest
|
||||||
# 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:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
uses: fabiocaccamo/create-matrix-action@v5
|
uses: fabiocaccamo/create-matrix-action@v5
|
||||||
with:
|
with:
|
||||||
matrix: |
|
matrix: |
|
||||||
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}
|
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}
|
||||||
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}
|
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}
|
||||||
os {macos}, cpu {amd64}, builder {macos-13}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
|
os {macos}, cpu {amd64}, builder {macos-13}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
|
||||||
os {macos}, cpu {arm64}, builder {macos-14}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
|
os {macos}, cpu {arm64}, builder {macos-14}, nim_version {${{ env.nim_version }}}, rust_version {${{ env.rust_version }}}, shell {bash --noprofile --norc -e -o pipefail}
|
||||||
|
|||||||
6
Makefile
6
Makefile
@ -179,11 +179,11 @@ coverage:
|
|||||||
$(MAKE) NIMFLAGS="$(NIMFLAGS) --lineDir:on --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage" test
|
$(MAKE) NIMFLAGS="$(NIMFLAGS) --lineDir:on --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage" test
|
||||||
cd nimcache/release/testCodex && rm -f *.c
|
cd nimcache/release/testCodex && rm -f *.c
|
||||||
mkdir -p coverage
|
mkdir -p coverage
|
||||||
lcov --capture --directory nimcache/release/testCodex --output-file coverage/coverage.info
|
lcov --capture --keep-going --directory nimcache/release/testCodex --output-file coverage/coverage.info
|
||||||
shopt -s globstar && ls $$(pwd)/codex/{*,**/*}.nim
|
shopt -s globstar && ls $$(pwd)/codex/{*,**/*}.nim
|
||||||
shopt -s globstar && lcov --extract coverage/coverage.info $$(pwd)/codex/{*,**/*}.nim --output-file coverage/coverage.f.info
|
shopt -s globstar && lcov --extract coverage/coverage.info --keep-going $$(pwd)/codex/{*,**/*}.nim --output-file coverage/coverage.f.info
|
||||||
echo -e $(BUILD_MSG) "coverage/report/index.html"
|
echo -e $(BUILD_MSG) "coverage/report/index.html"
|
||||||
genhtml coverage/coverage.f.info --output-directory coverage/report
|
genhtml coverage/coverage.f.info --keep-going --output-directory coverage/report
|
||||||
|
|
||||||
show-coverage:
|
show-coverage:
|
||||||
if which open >/dev/null; then (echo -e "\e[92mOpening\e[39m HTML coverage report in browser..." && open coverage/report/index.html) || true; fi
|
if which open >/dev/null; then (echo -e "\e[92mOpening\e[39m HTML coverage report in browser..." && open coverage/report/index.html) || true; fi
|
||||||
|
|||||||
@ -107,14 +107,14 @@ task coverage, "generates code coverage report":
|
|||||||
mkDir("coverage")
|
mkDir("coverage")
|
||||||
echo " ======== Running LCOV ======== "
|
echo " ======== Running LCOV ======== "
|
||||||
exec(
|
exec(
|
||||||
"lcov --capture --directory nimcache/coverage --output-file coverage/coverage.info"
|
"lcov --capture --keep-going --directory nimcache/coverage --output-file coverage/coverage.info"
|
||||||
)
|
)
|
||||||
exec(
|
exec(
|
||||||
"lcov --extract coverage/coverage.info --output-file coverage/coverage.f.info " &
|
"lcov --extract coverage/coverage.info --keep-going --output-file coverage/coverage.f.info " &
|
||||||
nimSrcs
|
nimSrcs
|
||||||
)
|
)
|
||||||
echo " ======== Generating HTML coverage report ======== "
|
echo " ======== Generating HTML coverage report ======== "
|
||||||
exec("genhtml coverage/coverage.f.info --output-directory coverage/report ")
|
exec("genhtml coverage/coverage.f.info --keep-going --output-directory coverage/report ")
|
||||||
echo " ======== Coverage report Done ======== "
|
echo " ======== Coverage report Done ======== "
|
||||||
|
|
||||||
task showCoverage, "open coverage html":
|
task showCoverage, "open coverage html":
|
||||||
|
|||||||
2
vendor/nim-leveldbstatic
vendored
2
vendor/nim-leveldbstatic
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 4da61d231a5e73c5daf85eb23f146242b90b144f
|
Subproject commit 378ef63e261e3b5834a3567404edc3ce838498b3
|
||||||
Loading…
x
Reference in New Issue
Block a user