package: enable compiling Java sources with JDK v20+ #813
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: general-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
code-formatting: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
env: | |
VFLAGS: -cc tcc | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v2 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v2 | |
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@v2 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v2 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules | |
- name: Run tests | |
run: v test ~/.vmodules/vab | |
- 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' | |
run: vab doctor | |
- name: Run 'vab install auto' | |
run: | | |
export ANDROID_SDK_ROOT="" # These are set in the CI by default | |
export ANDROID_HOME="" | |
export ANDROID_NDK_ROOT="" | |
vab install auto | |
- name: Run vab doctor | |
run: vab doctor | |
- name: Test vab complete | |
run: | | |
[ "$(vab complete bash vab com)" = "COMPREPLY+=('complete')" ] | |
- name: Setup env | |
run: | | |
mkdir apks | |
- name: Build APK (Default) examples/sokol/particles | |
run: | | |
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@v2 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v2 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules | |
- name: Run tests | |
run: v test ~/.vmodules/vab | |
- 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: Setup env | |
run: | | |
mkdir apks | |
- name: Build APK (Default) examples/sokol/particles | |
run: | | |
vab examples/sokol/particles -o apks/particles.apk | |
[ -f apks/particles.apk ] | |
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@v2 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v2 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules | |
- name: Run tests | |
run: v test ~/.vmodules/vab | |
- 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: Setup env | |
run: | | |
mkdir apks | |
- name: Build APK (Default) examples/sokol/particles | |
run: | | |
/usr/bin/vab examples/sokol/particles -o apks/particles.apk | |
[ -f apks/particles.apk ] | |
v-compiles-os-android: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v2 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make -j4 && sudo ./v symlink | |
- name: Checkout vab | |
uses: actions/checkout@v2 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: mv vab ~/.vmodules/ | |
- name: Run tests | |
run: v test ~/.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: Run vab doctor | |
run: vab doctor | |
- name: Check `v -os android` *without* -apk flag | |
run: .github/workflows/android_cross_compile.vsh | |
#macos-latest-bootstrap: | |
#runs-on: macOS-latest | |
#timeout-minutes: 10 | |
#steps: | |
#- name: Checkout V | |
#uses: actions/checkout@v2 | |
#with: | |
#repository: vlang/v | |
#- name: Build local v | |
#run: make -j4 | |
#- name: Checkout vab | |
#uses: actions/checkout@v2 | |
#with: | |
#path: vab | |
#- name: Run tests | |
#run: ./v test vab | |
#- name: Build vab with -prod | |
#run: ./v -prod vab/vab.v | |
#- name: Build vab | |
#run: ./v -g vab/vab.v | |
#- name: Run 'vab --help' | |
#run: vab/vab --help | |
#- name: Ruin Android environment on purpose | |
#run: | | |
#sudo rm -fr "$HOME/Library/Android" | |
#- name: Run 'vab doctor' | |
#run: | | |
#export VEXE=./v | |
#vab/vab doctor | |
#- name: Run 'vab install auto' | |
#run: | | |
#export ANDROID_SDK_ROOT="" # These are set in the CI by default | |
#export ANDROID_HOME="" | |
#export ANDROID_NDK_ROOT="" | |
#export VEXE=./v | |
## Sometimes this step fails in CI??? | |
##vab/vab -v 3 install auto | |
#- name: Run vab doctor | |
#run: | | |
#export VEXE=./v | |
#vab/vab doctor | |
#- name: Setup env | |
#run: | | |
#mkdir apks | |
#- name: Build APK (Default) examples/sokol/particles | |
#run: | | |
#export VEXE=./v | |
##vab/vab -v 3 examples/sokol/particles -o apks/particles.apk | |
windows-latest-build: | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
env: | |
VAB_FLAGS: -cg -v 3 --api 30 --build-tools 30.0.3 | |
steps: | |
#- uses: actions/setup-java@v2 | |
#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@v2 | |
with: | |
repository: vlang/v | |
path: v | |
- name: Checkout vab | |
uses: actions/checkout@v2 | |
with: | |
path: vab | |
- name: Simulate "v install vab" | |
run: Move-Item -Path .\vab -Destination $HOME\.vmodules\vab -force | |
- name: Run tests | |
run: v test "$HOME\.vmodules\vab" | |
# 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 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: Setup env | |
run: | | |
mkdir apks | |
# TODO mkdir aabs | |
- name: Build APK (Default) v/examples/sokol/particles | |
run: | | |
vab v\examples\sokol\particles -o apks\particles.apk | |
# TODO vab/vab v/examples/sokol/particles -o aabs/particles.aab |