Update v-build.yml #17
This file contains hidden or 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: V Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: Install dependencies | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y unzip curl build-essential | |
# Step 3: Install V compiler from source to ensure vlib is included | |
- name: Install V | |
run: | | |
git clone --depth=1 https://github.com/vlang/v.git | |
cd ./v | |
make | |
cd .. | |
sudo ln -s ./v/v /usr/local/bin/ | |
# Step 4: Verify V installation | |
- name: Verify V installation | |
run: v version | |
# Step 5: Init the project | |
- name: Init V project | |
run: v init | |
# Step 6: Build the project | |
- name: Build project | |
run: v main.v |