Skip to content

Commit

Permalink
trying
Browse files Browse the repository at this point in the history
  • Loading branch information
mantielero committed Dec 20, 2023
1 parent c78372a commit 9cb6dff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-zig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- uses: actions/checkout@v4
- uses: iffy/install-nim@v5
with:
nim-version: ${{ matrix.nimversion }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.nimversion }}
#repo-token: ${{ secrets.GITHUB_TOKEN }}
#env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: goto-bus-stop/setup-zig@v2
Expand Down Expand Up @@ -61,14 +61,14 @@ jobs:
- name: Execute FMU checker over inc.fmu in Linux
run: |
cd examples/inc
export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD
#export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD
/home/runner/work/fmu.nim/fmu.nim/FMUChecker-2.0.4-linux64/fmuCheck.linux64 -h 1 -s 14 -f inc.fmu
if: runner.os == 'Linux'

- name: Execute FMU checker over inc.fmu in Linux
run: |
cd examples/inc
export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD
#export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD
/home/runner/work/fmu.nim/fmu.nim/FMUChecker-2.0.4-linux64/fmuCheck.linux64 -h 1 -s 14 -f -l 6 -e inc.log -o inc.csv inc.fmu
if: runner.os == 'Linux'

Expand Down
8 changes: 5 additions & 3 deletions src/lib/fmu/fmubuilder.nim
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ template exportFmu*( fmu:Fmu;

var cmdline = "nim c --app:lib "

var zigPath = "zigcc"
var zigPath = "zigcc" # linux
if defined(windows):
zigPath &= ".cmd"
#var osvalue, relpath, ext, target: string

for (osvalue, relpath, ext, target) in @[("linux", "binaries/linux64", ".so", "x86_64-linux-gnu"), ("windows", "binaries/win64", ".dll", "x86_64-windows")]:
var execLine = cmdline
execLine &= " --os:" & osvalue & " --cc:clang --cpu:amd64 --os:" & osvalue
Expand All @@ -60,7 +60,9 @@ template exportFmu*( fmu:Fmu;

# x86_64-windows
# aarch64-linux
# nim c --cpu:arm --os:linux --cc:clang --os:linux --clang.exe="zigcc" --clang.linkerexe="zigcc" --passC:"-target arm-linux-musleabi -mcpu=arm1176jzf_s -fno-sanitize=undefined" --passL:"-target arm-linux-musleabi -mcpu=arm1176jzf_s" alarma.nim
# nim c --cpu:arm --os:linux --cc:clang --os:linux
# --passC:"-target arm-linux-musleabi -mcpu=arm1176jzf_s -fno-sanitize=undefined"
# --passL:"-target arm-linux-musleabi -mcpu=arm1176jzf_s"



Expand Down

0 comments on commit 9cb6dff

Please sign in to comment.