Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
+129
@@ -0,0 +1,129 @@
|
||||
name: CI Termux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.yml'
|
||||
- '!**/termux_ci.yml'
|
||||
- 'cmd/tools/**'
|
||||
- '!cmd/tools/builders/**.v'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.yml'
|
||||
- '!**/termux_ci.yml'
|
||||
- 'cmd/tools/**'
|
||||
- '!cmd/tools/builders/**.v'
|
||||
|
||||
jobs:
|
||||
termux-build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: Build and test in Termux
|
||||
run: |
|
||||
set -o xtrace
|
||||
echo "$PWD"
|
||||
whoami
|
||||
touch outside_docker.txt
|
||||
git log -n4
|
||||
echo "running docker ..."
|
||||
docker run --rm --mount type=bind,source=/home/runner/work/v/v,destination=/src -w /src termux/termux-docker:latest bash -c '
|
||||
set -o xtrace
|
||||
echo "running inside docker"
|
||||
whoami
|
||||
cp -r /src ~/vproject; cd ~/vproject
|
||||
touch inside_docker.txt
|
||||
ls -la
|
||||
echo "previous TERMUX_VERSION: $TERMUX_VERSION"
|
||||
export TERMUX_VERSION=0.118.3
|
||||
echo "explicit TERMUX_VERSION: $TERMUX_VERSION"
|
||||
bash .github/workflows/retry.sh pkg update -y
|
||||
bash .github/workflows/retry.sh pkg install -y clang libexecinfo libgc libgc-static make git
|
||||
git log -n4
|
||||
VFLAGS="-cc cc" make
|
||||
./v symlink
|
||||
export PATH="$HOME/.local/bin:/usr/local/bin:$PATH"
|
||||
v run examples/hello_world.v
|
||||
v run examples/primes.v
|
||||
v -e "import os; dump( os.user_os() )"
|
||||
'
|
||||
|
||||
termux-build-arm64-tcc:
|
||||
# Diagnostic job for vlang/v#27207: reproduces the Termux/AArch64 tcc
|
||||
# bootstrap failure on a real arm64 runner so we can collect logs without
|
||||
# local hardware. Allowed to fail until the upstream tcc AArch64 bug is
|
||||
# resolved.
|
||||
runs-on: ubuntu-24.04-arm
|
||||
continue-on-error: true
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: Build in Termux (arm64, default tcc)
|
||||
run: |
|
||||
set -o xtrace
|
||||
uname -a
|
||||
docker run --rm --platform=linux/arm64 --mount type=bind,source=/home/runner/work/v/v,destination=/src -w /src termux/termux-docker:aarch64 bash -c '
|
||||
set -o xtrace
|
||||
uname -a
|
||||
cp -r /src ~/vproject; cd ~/vproject
|
||||
export TERMUX_VERSION=0.118.3
|
||||
bash .github/workflows/retry.sh pkg update -y
|
||||
bash .github/workflows/retry.sh pkg install -y clang libexecinfo libgc libgc-static make git gdb file
|
||||
git log -n4
|
||||
ulimit -c unlimited || true
|
||||
# Explicit `-cc tcc` is required: on Linux arm64 the Makefile
|
||||
# otherwise injects `-cc "$(CC)"` (see GNUmakefile:149-155) and
|
||||
# the bundled tcc path would never run — defeating the purpose
|
||||
# of this diagnostic job for #27207. Capture every invocation
|
||||
# via -showcc and the full build output to build.log.
|
||||
set +e
|
||||
VFLAGS="-cc tcc -showcc -stats" make 2>&1 | tee build.log
|
||||
rc=${PIPESTATUS[0]}
|
||||
set -e
|
||||
echo "make exit code: $rc"
|
||||
# Always copy the log back to the bind-mounted dir so the runner
|
||||
# step that uploads the artifact can find it.
|
||||
cp build.log /src/build.log || true
|
||||
if [ "$rc" -ne 0 ] || [ ! -x ./v ]; then
|
||||
echo "===== bootstrap failed; collecting diagnostics ====="
|
||||
echo "--- tcc binary ---"
|
||||
ls -la thirdparty/tcc/ 2>/dev/null || true
|
||||
for t in thirdparty/tcc/tcc.exe thirdparty/tcc/tcc; do
|
||||
if [ -x "$t" ]; then "$t" -v || true; fi
|
||||
done
|
||||
echo "--- last 120 lines of build.log ---"
|
||||
tail -n 120 build.log || true
|
||||
echo "--- v1/v2/v file info ---"
|
||||
file v1 v2 v 2>/dev/null || true
|
||||
echo "--- last tcc invocations from build.log ---"
|
||||
grep -E "tcc(\.exe)? " build.log | tail -n10 || true
|
||||
echo "--- core files (if any) ---"
|
||||
ls -la core* 2>/dev/null || true
|
||||
for c in core core.*; do
|
||||
if [ -f "$c" ] && [ -x ./v2 ]; then
|
||||
echo "--- gdb backtrace from $c against v2 ---"
|
||||
gdb --batch --ex bt --ex "info registers" ./v2 "$c" || true
|
||||
fi
|
||||
done
|
||||
# If make exited 0 but ./v is missing, force a nonzero exit so
|
||||
# the diagnostic job does not go green without a usable compiler.
|
||||
if [ "$rc" -eq 0 ]; then rc=1; fi
|
||||
exit "$rc"
|
||||
fi
|
||||
echo "===== bootstrap succeeded ====="
|
||||
./v -version
|
||||
./v run examples/hello_world.v
|
||||
'
|
||||
- name: Upload build log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: termux-arm64-build-log
|
||||
path: build.log
|
||||
if-no-files-found: ignore
|
||||
Reference in new issue
Block a user