add github.com/status-im/nim-leopard to vendor (#61)

* [leopard] add github.com/status-im/nim-leopard to vendor

* [leopard] specify absolute path for nimcache dir

* [leopard] make adjustments to nim-dagger CI GHA workflow
This commit is contained in:
Michael Bradley 2022-03-30 10:34:47 -05:00 committed by GitHub
parent 43cea1743a
commit 1e5b41a447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 4 deletions

View File

@ -7,7 +7,6 @@ jobs:
fail-fast: false fail-fast: false
max-parallel: 20 max-parallel: 20
matrix: matrix:
branch: [v1.4.6]
target: target:
# Unit tests # Unit tests
- os: linux - os: linux
@ -35,7 +34,7 @@ jobs:
- target: - target:
os: windows os: windows
builder: windows-2019 builder: windows-2019
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (${{ matrix.branch }})' name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}'
runs-on: ${{ matrix.builder }} runs-on: ${{ matrix.builder }}
steps: steps:
- name: Checkout nim-dagger - name: Checkout nim-dagger
@ -93,6 +92,25 @@ jobs:
EOF EOF
chmod 755 external/bin/gcc external/bin/g++ chmod 755 external/bin/gcc external/bin/g++
echo '${{ github.workspace }}/external/bin' >> $GITHUB_PATH echo '${{ github.workspace }}/external/bin' >> $GITHUB_PATH
NIMFLAGS="-d:LeopardCmakeFlags='-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32'"
quote () {
local quoted=${1//\'/\'\\\'\'};
printf "'%s'" "$quoted"
}
echo "NIMFLAGS=$(quote "${NIMFLAGS}")" >> $GITHUB_ENV
- name: Install build dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install libomp
echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L$(brew --prefix)/opt/libomp/lib -L$(brew --prefix)/opt/llvm/lib -Wl,-rpath,$(brew --prefix)/opt/llvm/lib" >> $GITHUB_ENV
NIMFLAGS="-d:LeopardCmakeFlags='-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(brew --prefix)/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix)/opt/llvm/bin/clang++' -d:LeopardExtraCompilerlags='-fopenmp' -d:LeopardExtraLinkerFlags='-fopenmp -L$(brew --prefix)/opt/libomp/lib'"
quote () {
local quoted=${1//\'/\'\\\'\'};
printf "'%s'" "$quoted"
}
echo "NIMFLAGS=$(quote "${NIMFLAGS}")" >> $GITHUB_ENV
- name: Restore MinGW-W64 (Windows) from cache - name: Restore MinGW-W64 (Windows) from cache
if: runner.os == 'Windows' if: runner.os == 'Windows'
@ -186,3 +204,12 @@ jobs:
working-directory: nim-dagger working-directory: nim-dagger
run: | run: |
make testAll make testAll
if [[ ${{ runner.os }} = macOS ]]; then
echo
echo otool -L build/testDagger
otool -L build/testDagger
else
echo
echo ldd build/testDagger
ldd build/testDagger
fi

3
.gitmodules vendored
View File

@ -175,3 +175,6 @@
url = https://github.com/status-im/nim-taskpools.git url = https://github.com/status-im/nim-taskpools.git
ignore = untracked ignore = untracked
branch = master branch = master
[submodule "vendor/nim-leopard"]
path = vendor/nim-leopard
url = https://github.com/status-im/nim-leopard.git

View File

@ -1,7 +1,9 @@
import std/os
if defined(release): if defined(release):
switch("nimcache", "nimcache/release/$projectName") switch("nimcache", joinPath(currentSourcePath.parentDir, "nimcache/release/$projectName"))
else: else:
switch("nimcache", "nimcache/debug/$projectName") switch("nimcache", joinPath(currentSourcePath.parentDir, "nimcache/debug/$projectName"))
if defined(windows): if defined(windows):
# disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries # disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries

1
vendor/nim-leopard vendored Submodule

@ -0,0 +1 @@
Subproject commit 41cd86df5bfa67afe7d3660e8ab0878133c8600e