ci: add experimental support for building V and testing on a Termux docker container (#25059)

This commit is contained in:
Delyan Angelov 2025-08-07 11:37:25 +03:00 committed by GitHub
parent 2cdacb8c00
commit 91889953ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 55 additions and 0 deletions

View File

@ -1,14 +1,21 @@
name: Path Testing CI
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/paths_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
pull_request:
paths-ignore:
- '**.md'
- '**.yml'
- '!**/paths_ci.yml'
- 'cmd/tools/**'
- '!cmd/tools/builders/**.v'
concurrency:
group: paths-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}

48
.github/workflows/termux_ci.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: CI Termux
on:
workflow_dispatch:
push:
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@v4
- 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
pkg update -y
pkg install -y clang libexecinfo libgc libgc-static make git
git log -n4
VFLAGS="-cc cc -os termux" make
./v symlink
v run examples/hello_world.v
v run examples/primes.v
'