compile: support -d no_gc_threads
#1048
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code CI | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
code-formatting: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
VFLAGS: -cc tcc | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Test code formatting | |
run: | | |
cd vab | |
v test-fmt | |
# TODO this makes formatting checks fail? | |
#- name: Simulate "v install vab" | |
# run: mv vab ~/.vmodules | |
- name: Symlink as module | |
run: sudo ln -s $(pwd)/vab ~/.vmodules/vab # Workaround for doing `mv vab ~/.vmodules` | |
- name: Build vab with -skip-unused | |
run: v -skip-unused ~/.vmodules/vab | |
- name: Build vab | |
run: v -g ~/.vmodules/vab | |
- name: Symlink vab command | |
run: sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab | |
- name: Test clean vab code | |
run: | | |
vab test-cleancode ~/.vmodules/vab | |
ubuntu-latest-bootstrap: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
VAB_FLAGS: -v 3 | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules | |
- name: Build vab with -prod | |
run: v -prod ~/.vmodules/vab | |
- name: Build vab | |
run: v -g ~/.vmodules/vab | |
- name: Symlink vab | |
run: sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab | |
- name: Run 'vab --help' | |
run: vab --help | |
- name: Ruin Android environment on purpose | |
run: | | |
sudo rm -fr /usr/local/lib/android | |
- name: Run 'vab doctor' before | |
run: vab doctor | |
- name: Run 'vab install auto' | |
run: | | |
unset ANDROID_SDK_ROOT # These are set in the CI by default | |
unset ANDROID_HOME | |
unset ANDROID_NDK_ROOT | |
vab install auto | |
- name: Run 'vab doctor' after | |
run: vab doctor | |
- name: Test vab complete | |
run: | | |
[ "$(vab complete bash vab com)" = "COMPREPLY+=('complete')" ] | |
- name: Run tests | |
run: v test ~/.vmodules/vab | |
- name: Build APK (Default) examples/sokol/particles | |
run: | | |
mkdir apks | |
vab examples/sokol/particles -o apks/particles.apk | |
[ -f apks/particles.apk ] | |
ubuntu-latest-build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
VAB_FLAGS: -v 3 | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules | |
- name: Build vab with -prod | |
run: v -prod ~/.vmodules/vab | |
- name: Build vab | |
run: v -g ~/.vmodules/vab | |
- name: Symlink vab | |
run: sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab | |
- name: Run 'vab --help' | |
run: vab --help | |
- name: Ruin Android environment on purpose | |
run: | | |
sudo rm -fr "$ANDROID_SDK_ROOT/platforms" | |
- name: Run 'vab doctor' | |
run: vab doctor | |
- name: Run vab --list-* flags | |
run: | | |
vab --list-apis | |
vab --list-build-tools | |
vab --list-ndks | |
- name: Run 'vab install "platforms;android-21"' | |
run: vab install "platforms;android-21" | |
- name: Run vab doctor | |
run: vab doctor | |
- name: Run tests | |
run: v test ~/.vmodules/vab | |
- name: Build APK (Default) examples/sokol/particles | |
run: | | |
mkdir apks | |
vab examples/sokol/particles -o apks/particles.apk | |
[ -f apks/particles.apk ] | |
ubuntu-latest-extra-command: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
VFLAGS: -d vab_allow_extra_commands | |
VAB_FLAGS: -v 3 | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Install dependencies | |
run: | | |
v retry -- sudo apt-get update | |
v retry -- sudo apt-get install --quiet -y libsdl2-dev libsdl2-ttf-dev | |
v retry -- sudo apt-get install --quiet -y libsdl2-mixer-dev libsdl2-image-dev | |
- name: Checkout SDL | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/sdl | |
fetch-depth: 0 | |
path: sdl | |
- name: Simulate "v install sdl" | |
run: mv sdl ~/.vmodules | |
- name: Setup vlang/sdl | |
run: v ~/.vmodules/sdl/setup.vsh | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Install vab | |
run: | | |
mv vab ~/.vmodules | |
v -g ~/.vmodules/vab | |
sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab | |
- name: Run 'vab --help' | |
run: vab --help | |
- name: Install extra command | |
run: | | |
vab install extra larpon/vab-sdl | |
- name: Run vab doctor | |
run: vab doctor | |
- name: Test extra command | |
run: | | |
vab sdl doctor | |
ubuntu-latest-vab-can-live-anywhere: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
VAB_FLAGS: -v 3 | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules | |
- name: Build vab | |
run: v -g ~/.vmodules/vab | |
- name: Move vab | |
run: | | |
sudo mv ~/.vmodules/vab/vab /usr/bin/vab | |
- name: Run 'vab --help' | |
run: /usr/bin/vab --help | |
- name: Run 'vab doctor' | |
run: /usr/bin/vab doctor | |
- name: Run tests | |
run: v test ~/.vmodules/vab | |
- name: Build APK (Default) examples/sokol/particles | |
run: | | |
mkdir apks | |
/usr/bin/vab examples/sokol/particles -o apks/particles.apk | |
[ -f apks/particles.apk ] | |
v-compiles-os-android: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules/ | |
- name: Build vab | |
run: v -g ~/.vmodules/vab | |
- name: Symlink vab | |
run: sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab | |
- name: Run vab --help | |
run: vab --help | |
- name: Run vab doctor | |
run: vab doctor | |
- name: Check `v -os android` *without* -apk flag | |
run: .github/workflows/android_cross_compile.vsh | |
windows-latest-build: | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
env: | |
VAB_FLAGS: -cg -v 3 --api 31 --build-tools 30.0.3 | |
steps: | |
#- uses: actions/setup-java@v4 | |
#with: | |
#distribution: 'adopt' | |
#java-version: 15 | |
- name: Install V | |
uses: vlang/setup-v@v1 | |
with: | |
check-latest: true | |
# TODO https://github.com/vlang/setup-v/issues | |
- name: Checkout V examples | |
uses: actions/checkout@v4 | |
with: | |
repository: vlang/v | |
path: v | |
- name: Checkout vab | |
uses: actions/checkout@v4 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: Move-Item -Path .\vab -Destination $HOME\.vmodules\vab -force | |
# TODO fails on Windows | |
# - name: Build vab with -prod | |
# run: v -prod "$HOME\.vmodules\vab" | |
- name: Build vab | |
run: v -g "$HOME\.vmodules\vab" | |
- name: Add vab to PATH | |
run: echo "$HOME\.vmodules\vab" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Run vab --help | |
run: vab --help | |
- name: Install Java 8 matching build-tools | |
run: | | |
vab install "build-tools;30.0.3" | |
- name: Install AAB dependencies | |
run: | | |
vab install bundletool | |
vab install aapt2 | |
- name: Run vab doctor | |
run: vab doctor | |
- name: Run vab --list-* flags | |
run: | | |
vab --list-apis | |
vab --list-build-tools | |
vab --list-ndks | |
- name: Run tests | |
run: v test "$HOME\.vmodules\vab" | |
- name: Build APK (Default) v/examples/sokol/particles | |
run: | | |
mkdir apks | |
vab v\examples\sokol\particles -o apks\particles.apk | |
# TODO vab/vab v/examples/sokol/particles -o aabs/particles.aab |