@@ -39,19 +39,22 @@ jobs:
3939
4040 - name : " x86_64-macos: Rosetta, build, run"
4141 continue-on-error : true
42+ shell : bash
4243 run : |
43- set -x
44+ set +e -x
4445 arch -x86_64 /usr/bin/true && echo "READING rosetta=yes" || echo "READING rosetta=no"
4546 mkdir -p /tmp/xm/src && cd /tmp/xm
46- printf '[package]\nname = "xm"\nversion = "0.1.0"\n\n[targets.xm]\nkind = "bin"\nmain = "src/main.cpp"\n' > mcpp.toml
47+ printf '[package]\nname = "xm"\nversion = "0.1.0"\n\n[targets.xm]\nkind = "bin"\nmain = "src/main.cpp"\n\n[target.x86_64-macos]\ntoolchain = "llvm@%s"\n' "$MCPP_LLVM_VER" > mcpp.toml
48+ cat mcpp.toml
4749 printf 'import std;\nint main() { std::println("xm {}", sizeof(void*)); return 5; }\n' > src/main.cpp
48- "$FRESH" build --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -25
49- f=$(find target -type f -name xm -perm -u+x | head -1)
50- file "$f"
51- "$f" ; echo "READING direct rc=$? "
52- "$FRESH" run --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -8 ; echo "READING run rc=${PIPESTATUS[0]}"
50+ "$FRESH" build --target x86_64-macos 2>&1 | tail -25
51+ ls target
52+ for f in $(find target -type f -name xm -perm -u+x); do file "$f"; otool -L "$f" | head -5; "$f"; echo "READING direct $f rc=$?"; done
53+ "$FRESH" run --target x86_64-macos 2>&1 | tail -8 ; echo "READING run rc=${PIPESTATUS[0]} "
54+ "$FRESH" why toolchain --target x86_64-macos --format json 2>&1 | head -c 2500 ; echo
5355 printf '#include <stdio.h>\nint main(void) { printf("c %%d\\n", (int)sizeof(long)); return 6; }\n' > src/main.c
54- printf '[package]\nname = "xm"\nversion = "0.1.0"\n\n[targets.xm]\nkind = "bin"\nmain = " src/main.c"\n' > mcpp.toml
56+ sed -i '' 's#src/main.cpp# src/main.c#' mcpp.toml
5557 rm -f src/main.cpp
56- "$FRESH" run --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -8; echo "READING c run rc=${PIPESTATUS[0]}"
57- "$FRESH" test --target x86_64-macos --toolchain "llvm@${MCPP_LLVM_VER}" 2>&1 | tail -5 || true
58+ "$FRESH" run --target x86_64-macos 2>&1 | tail -8; echo "READING c run rc=${PIPESTATUS[0]}"
59+ mkdir -p tests && printf 'int main() { return 0; }\n' > tests/t.cpp
60+ "$FRESH" test --target x86_64-macos 2>&1 | tail -6; echo "READING test rc=${PIPESTATUS[0]}"
0 commit comments