install: make the script print its own version at the start too. #303
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/[email protected] | |
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 |