[all] Merge index expression and slice expression #230
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: Analyzer CI | |
on: | |
push: | |
paths-ignore: | |
- '.github/**' | |
- '!**/analyzer_tests.yml' | |
- '!**/version_test.vv' | |
- 'editors/code/**' | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
- '!**/analyzer_tests.yml' | |
- '!**/version_test.vv' | |
- 'editors/code/**' | |
- '**/*.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
cc: clang | |
- os: ubuntu-20.04 | |
cc: gcc | |
- os: windows-latest | |
cc: gcc | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
VFLAGS: -cg -cc ${{ matrix.cc }} | |
steps: | |
- name: Install V | |
id: install-v | |
uses: vlang/setup-v@v1.4 | |
with: | |
check-latest: true | |
- name: Checkout v-analyzer | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Run tests | |
run: v test . | |
- name: Install v-analyzer | |
if: runner.os != 'Windows' | |
run: | | |
# Build and install v-analyzer at the head ref of the submitted changes. | |
v run build.vsh | |
sudo mv ./bin/v-analyzer /usr/local/bin/v-analyzer | |
v-analyzer --version | |
- name: Verify version | |
# TODO: include Windows | |
if: runner.os != 'Windows' | |
run: v .github/workflows/version_test.vv | |
- name: Verify formatting | |
shell: bash | |
run: | | |
set +e | |
v fmt -c . | |
exit_code=$? | |
# Don't fail on internal errors. | |
if [[ $exit_code -ne 0 && $exit_code -ne 5 ]]; then | |
v fmt -diff . | |
exit 1 | |
fi |