-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lints, rework and enable lint workflow (#177)
- Loading branch information
Showing
6 changed files
with
85 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,91 +17,6 @@ on: | |
- main | ||
|
||
jobs: | ||
validate-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout VSL | ||
uses: actions/checkout@v3 | ||
with: | ||
path: vsl | ||
|
||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
|
||
- name: V doctor | ||
run: v doctor | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && \ | ||
sudo apt-get install --quiet -y --no-install-recommends \ | ||
gfortran \ | ||
libxi-dev \ | ||
libxcursor-dev \ | ||
mesa-common-dev \ | ||
liblapacke-dev \ | ||
libopenblas-dev \ | ||
libgc-dev \ | ||
libgl1-mesa-dev \ | ||
libopenmpi-dev \ | ||
libhdf5-dev \ | ||
hdf5-tools \ | ||
opencl-headers | ||
- name: Copy VSL source code to V Modules | ||
run: cp -rf ./vsl ~/.vmodules | ||
|
||
- name: Validate Docs | ||
run: | | ||
cd ~ | ||
v check-md ~/.vmodules/vsl | ||
fmt-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout VSL | ||
uses: actions/checkout@v3 | ||
with: | ||
path: vsl | ||
|
||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
|
||
- name: V doctor | ||
run: v doctor | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && \ | ||
sudo apt-get install --quiet -y --no-install-recommends \ | ||
gfortran \ | ||
libxi-dev \ | ||
libxcursor-dev \ | ||
mesa-common-dev \ | ||
liblapacke-dev \ | ||
libopenblas-dev \ | ||
libgc-dev \ | ||
libgl1-mesa-dev \ | ||
libopenmpi-dev \ | ||
libhdf5-dev \ | ||
hdf5-tools \ | ||
opencl-headers | ||
- name: Move VSL source code to V Modules | ||
run: mv ./vsl ~/.vmodules | ||
|
||
- name: Verify Fmt | ||
# TODO: Remove continue-on-error when v fmt -verify is fixed for VSL on CI | ||
continue-on-error: true | ||
run: | | ||
cd ~ | ||
v fmt -verify ~/.vmodules/vsl | ||
run-tests-on-linux: | ||
runs-on: ${{ matrix.os }} | ||
|
||
|
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,40 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout VSL | ||
uses: actions/checkout@v4 | ||
with: | ||
path: vsl | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- name: Setup VSL as V module | ||
run: mv vsl ~/.vmodules/ | ||
- name: Validate Docs | ||
run: v check-md -hide-warnings ~/.vmodules/vsl | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout VSL | ||
uses: actions/checkout@v4 | ||
with: | ||
path: vsl | ||
- name: Setup V | ||
uses: vlang/[email protected] | ||
with: | ||
check-latest: true | ||
- name: Setup VSL as V module | ||
run: mv vsl ~/.vmodules/ | ||
- name: Check Formatting | ||
# NOTE: `cd` into module dir required. Currently, running `v fmt -verify` from outside the module dir | ||
# would encounter errors and `v fmt -w` would even break the module. | ||
run: cd ~/.vmodules/vsl && v fmt -verify . |
This file was deleted.
Oops, something went wrong.
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
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