-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
200 additions
and
75 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Lint | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ui | ||
- name: Check formatting | ||
run: v fmt -verify ui/ | ||
|
||
vet: | ||
runs-on: ubuntu-latest | ||
if: false # TODO: satisfy vet tool | ||
steps: | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ui | ||
- name: Run vet | ||
run: v vet ui/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Linux CI | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
# Path where the module is installed for usage as V module. | ||
MOD_PATH: $HOME/.vmodules/ui | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ui | ||
- name: Setup V UI module | ||
shell: bash | ||
run: | | ||
mv ui ${{ env.MOD_PATH }} | ||
find $HOME/.vmodules | ||
- name: Cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
vlang | ||
~/.vmodules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
|
||
build: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore V cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
vlang | ||
~/.vmodules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- name: Install dependencies | ||
run: sudo apt update && sudo apt install --quiet -y libglfw3-dev libxi-dev libxcursor-dev | ||
- name: Build UI examples | ||
run: v run ${{ env.MOD_PATH }}/examples/build_examples.vsh | ||
- name: Build users.v with -prod | ||
run: v -prod ${{ env.MOD_PATH }}/examples/users.v |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: macOS CI | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
# Path where the module is installed for usage as V module. | ||
MOD_PATH: $HOME/.vmodules/ui | ||
|
||
jobs: | ||
setup: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ui | ||
- name: Setup V UI module | ||
shell: bash | ||
run: | | ||
mv ui ${{ env.MOD_PATH }} | ||
find $HOME/.vmodules | ||
- name: Cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
vlang | ||
~/.vmodules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
|
||
build: | ||
needs: setup | ||
runs-on: macos-latest | ||
steps: | ||
- name: Restore V cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
vlang | ||
~/.vmodules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- name: Build UI examples | ||
run: v run ${{ env.MOD_PATH }}/examples/build_examples.vsh | ||
- name: Build users.v with -prod | ||
run: v -prod ${{ env.MOD_PATH }}/examples/users.v |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Windows CI | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
# Path where the module is installed for usage as V module. | ||
MOD_PATH: $HOME/.vmodules/ui | ||
|
||
jobs: | ||
setup: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ui | ||
- name: Setup V UI module | ||
shell: bash | ||
run: | | ||
mv ui ${{ env.MOD_PATH }} | ||
find $HOME/.vmodules | ||
- name: Cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
vlang | ||
~/.vmodules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
|
||
build: | ||
needs: setup | ||
runs-on: windows-latest | ||
steps: | ||
- name: Restore V cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
vlang | ||
~/.vmodules | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- name: Build UI examples | ||
run: v run ${{ env.MOD_PATH }}/examples/build_examples.vsh | ||
- name: Build users.v with -prod | ||
run: v -prod ${{ env.MOD_PATH }}/examples/users.v |