Skip to content

Commit

Permalink
ci: update symlink ci, extend tested cases (#21466)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm authored May 8, 2024
1 parent c21f7f0 commit 3158f58
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 67 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/check_symlink_works.yml

This file was deleted.

76 changes: 76 additions & 0 deletions .github/workflows/symlink_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Symlink CI

on:
workflow_dispatch:
push:
paths:
- 'cmd/tools/vsymlink/**.v'
- '.github/workflows/symlink_ci.yml'
pull_request:
paths:
- 'cmd/tools/vsymlink/**.v'
- '.github/workflows/symlink_ci.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name == 'master' && github.sha || github.ref_name }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-13]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Build V
run: make -j4
- name: Symlink
run: |
./v symlink
cd /tmp/ && v version
cd ~ && v version
echo 'println(123)' > hi.v
v run hi.v
- name: Unlink
run: |
rm $(which v)
v --version && exit 1 || exit 0
- name: Symlink (sudo)
run: |
sudo ./v symlink
cd /tmp/ && v version
cd ~ && v version
echo 'println(123)' > hi.v
v run hi.v
- name: Unlink
run: |
rm $(which v)
v --version && exit 1 || exit 0
- name: Symlink (-githubci)
run: |
./v symlink --githubci
cd /tmp/ && v version
cd ~ && v version
echo 'println(123)' > hi.v
v run hi.v
test-windows:
runs-on: windows-2019
strategy:
matrix:
flags: ['', '-githubci']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Build V
run: ./make.bat
- name: Symlink
run: ./v symlink ${{ matrix.flags }}
- name: Check if V is usable
run: |
cd $RUNNER_TEMP && pwd && v version
cd ~ && pwd && v version
echo 'println(123)' > hi.v
v run hi.v

0 comments on commit 3158f58

Please sign in to comment.