Skip to content

Commit

Permalink
ci: remove obsolete cancel job, use concurrency group names from V CI (
Browse files Browse the repository at this point in the history
…#307)

* ci: remove obsolete cancel job, use concurrency group names from V CI jobs

* ci: use `action/cache@v4`
  • Loading branch information
larpon authored Sep 18, 2024
1 parent ef105e6 commit c952364
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 123 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/cancel.yml

This file was deleted.

103 changes: 13 additions & 90 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "**.md"

concurrency:
group: general-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -79,9 +79,6 @@ jobs:
- 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

Expand Down Expand Up @@ -115,12 +112,12 @@ jobs:
run: |
[ "$(vab complete bash vab com)" = "COMPREPLY+=('complete')" ]
- name: Setup env
run: |
mkdir apks
- 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 ]
Expand All @@ -146,9 +143,6 @@ jobs:
- 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

Expand Down Expand Up @@ -180,12 +174,12 @@ jobs:
- name: Run vab doctor
run: vab doctor

- name: Setup env
run: |
mkdir apks
- 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 ]
Expand All @@ -211,9 +205,6 @@ jobs:
- 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

Expand All @@ -227,12 +218,12 @@ jobs:
- name: Run 'vab doctor'
run: /usr/bin/vab doctor

- name: Setup env
run: |
mkdir apks
- 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 ]
Expand All @@ -256,9 +247,6 @@ jobs:
- 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

Expand All @@ -274,67 +262,6 @@ jobs:
- 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@v4
#with:
#repository: vlang/v

#- name: Build local v
#run: make -j4

#- name: Checkout vab
#uses: actions/checkout@v4
#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
Expand Down Expand Up @@ -367,9 +294,6 @@ jobs:
- 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"
Expand Down Expand Up @@ -401,12 +325,11 @@ jobs:
vab --list-build-tools
vab --list-ndks
- name: Setup env
run: |
mkdir apks
# TODO mkdir aabs
- 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
10 changes: 5 additions & 5 deletions .github/workflows/ci_emulator_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "**.md"

concurrency:
group: emulator-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -38,9 +38,6 @@ jobs:
- 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

Expand All @@ -65,9 +62,12 @@ jobs:
- name: Run vab doctor
run: vab doctor

- name: Run tests
run: v test ~/.vmodules/vab

- name: Cache emulator
id: cache-emulator
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
/Users/runner/.android/avd
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: Docs CI
### the developers should receive early warning if they break it.
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
check-markdown:
runs-on: ubuntu-latest
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/matrix_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "**.md"

concurrency:
group: matrix-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -46,9 +46,6 @@ jobs:
- 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

Expand All @@ -61,6 +58,9 @@ jobs:
- name: Run vab doctor
run: vab doctor

- name: Run tests
run: ./v test ~/.vmodules/vab

# AAB
- name: Install AAB dependencies
run: |
Expand Down Expand Up @@ -98,6 +98,7 @@ jobs:
os: [ubuntu-20.04]
java-version: [11, 15, 20]
android-api: [31, 33]
fail-fast: false
timeout-minutes: 20
env:
VAB_FLAGS: -v 3 -gc none --build-tools 29.0.0
Expand All @@ -123,9 +124,6 @@ jobs:
- 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

Expand All @@ -138,6 +136,9 @@ jobs:
- name: Run vab doctor
run: vab doctor

- name: Run tests
run: ./v test ~/.vmodules/vab

- name: Build examples with garbage collector (Java ${{ matrix.java-version }}) ${{ matrix.android-api }}
run: |
Expand Down Expand Up @@ -188,9 +189,6 @@ jobs:
- 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

Expand All @@ -217,6 +215,9 @@ jobs:
- name: Run vab doctor
run: vab doctor

- name: Run tests
run: ./v test ~/.vmodules/vab

# AAB
- name: Install AAB dependencies
run: |
Expand Down

0 comments on commit c952364

Please sign in to comment.