2021-09-28 17:26:40 +03:00
|
|
|
name: Bootstraping works
|
|
|
|
|
|
|
|
on:
|
2022-07-12 11:02:51 +03:00
|
|
|
schedule:
|
|
|
|
- cron: '0 */6 * * *'
|
2021-09-28 17:26:40 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
ubuntu:
|
2022-07-12 11:02:51 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event.ref == 'refs/heads/master' && github.event.repository.full_name == 'vlang/v'
|
2022-03-02 20:51:40 +03:00
|
|
|
timeout-minutes: 30
|
2021-09-28 17:26:40 +03:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc tcc -no-retry-compilation
|
2022-07-12 11:02:51 +03:00
|
|
|
B_CFLAGS: -g -std=c99 -w
|
2021-09-28 17:26:40 +03:00
|
|
|
B_LFLAGS: -lm -lpthread
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-28 17:26:40 +03:00
|
|
|
with:
|
2021-09-28 18:43:33 +03:00
|
|
|
fetch-depth: 10
|
2021-09-28 17:26:40 +03:00
|
|
|
- name: Build v
|
|
|
|
run: make
|
|
|
|
|
|
|
|
- name: v.c can be compiled and run with -os cross (bootstrapping works)
|
|
|
|
run: |
|
|
|
|
ls -la v vc/v.c
|
|
|
|
./v -os cross -o vc/v.c cmd/v
|
|
|
|
gcc $B_CFLAGS -o v_from_vc vc/v.c $B_LFLAGS
|
|
|
|
ls -lart v_from_vc
|
|
|
|
./v_from_vc version
|
|
|
|
./v_from_vc run examples/hello_world.v
|
|
|
|
./v_from_vc -o v_from_vc_produced_native_v cmd/v
|
|
|
|
./v_from_vc_produced_native_v run examples/hello_world.v
|
|
|
|
make local=1
|
|
|
|
ls -la v vc/v.c v_from_vc v_from_vc_produced_native_v
|
|
|
|
|
|
|
|
- name: Ensure v up works
|
|
|
|
run: |
|
|
|
|
./v cmd/tools/oldv.v
|
|
|
|
./cmd/tools/oldv -v HEAD^^^^^
|
|
|
|
cd ~/.cache/oldv/v_at_HEAD_____/
|
|
|
|
./v version
|
|
|
|
./v -v up
|
|
|
|
./v version
|
|
|
|
./v -o v2 cmd/v
|
|
|
|
./v2 -o v3 cmd/v
|
|
|
|
|
|
|
|
macos:
|
2022-07-12 11:02:51 +03:00
|
|
|
runs-on: macos-latest
|
|
|
|
if: github.event.ref == 'refs/heads/master' && github.event.repository.full_name == 'vlang/v'
|
2022-03-02 20:51:40 +03:00
|
|
|
timeout-minutes: 30
|
2021-09-28 17:26:40 +03:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc clang
|
2022-07-12 11:02:51 +03:00
|
|
|
B_CFLAGS: -g -std=c99 -w
|
2021-09-28 17:26:40 +03:00
|
|
|
B_LFLAGS: -lm -lpthread
|
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-28 17:26:40 +03:00
|
|
|
with:
|
2021-09-28 18:43:33 +03:00
|
|
|
fetch-depth: 10
|
2021-09-28 17:26:40 +03:00
|
|
|
- name: Build V
|
|
|
|
run: make && ./v -cg -cstrict -o v cmd/v
|
|
|
|
|
|
|
|
- name: v.c can be compiled and run with -os cross (bootstrapping works)
|
|
|
|
run: |
|
|
|
|
ls -la v vc/v.c
|
|
|
|
./v -os cross -o vc/v.c cmd/v
|
|
|
|
cc $B_CFLAGS -o v_from_vc vc/v.c $B_LFLAGS
|
|
|
|
ls -lart v_from_vc
|
|
|
|
./v_from_vc version
|
|
|
|
./v_from_vc run examples/hello_world.v
|
|
|
|
./v_from_vc -o v_from_vc_produced_native_v cmd/v
|
|
|
|
./v_from_vc_produced_native_v run examples/hello_world.v
|
|
|
|
### the next make invocation will simulate building V from scratch,
|
|
|
|
### using this commit
|
|
|
|
make local=1
|
|
|
|
ls -la v vc/v.c v_from_vc v_from_vc_produced_native_v
|