mirror of
https://github.com/vlang/v.git
synced 2025-09-17 11:26:17 -04:00
ci: add a v-up-works-ubuntu job, to ensure more robust v up
runs (#21401)
This commit is contained in:
parent
045951924f
commit
1c2fe61663
71
.github/workflows/vup_works.yml
vendored
Normal file
71
.github/workflows/vup_works.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
name: Upgrading from a previous release with v up works
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.yml'
|
||||
- '**.vv'
|
||||
- '**.out'
|
||||
- '!**/vup_works.yml'
|
||||
- '!cmd/tools/vup.v'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.yml'
|
||||
- '**.vv'
|
||||
- '**.out'
|
||||
- '!**/vup_works.yml'
|
||||
- '!cmd/tools/vup.v'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
v-up-works-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build v
|
||||
run: make && ./v symlink -githubci && ./v version
|
||||
|
||||
- name: Download latest release ZIP
|
||||
run: wget https://github.com/vlang/v/releases/latest/download/v_linux.zip
|
||||
|
||||
- name: Extract ZIP 1, no changes
|
||||
run: |
|
||||
rm -rf /tmp/v_linux && unzip -q -d v_linux/ v_linux.zip && mv v_linux /tmp/v_linux
|
||||
cd /tmp/v_linux/v
|
||||
./v version
|
||||
./v up
|
||||
echo "Updated ./v version: $(./v version) | Current v version: $(v version)"
|
||||
|
||||
- name: Extract ZIP 2, with local changes
|
||||
run: |
|
||||
rm -rf /tmp/v_linux && unzip -q -d v_linux/ v_linux.zip && mv v_linux /tmp/v_linux
|
||||
touch /tmp/v_linux/v/vlib/v/pref/local_file_not_present_in_master.c.v && rm /tmp/v_linux/v/examples/hello_world.v
|
||||
cd /tmp/v_linux/v
|
||||
./v version
|
||||
./v up
|
||||
echo "Updated ./v version: $(./v version) | Current v version: $(v version)"
|
||||
|
||||
- name: Extract ZIP 3, with current vup.v in the extract
|
||||
run: |
|
||||
rm -rf /tmp/v_linux && unzip -q -d v_linux/ v_linux.zip && mv v_linux /tmp/v_linux
|
||||
rm -rf /tmp/v_linux/v/cmd/tools/vup && cp cmd/tools/vup.v /tmp/v_linux/v/cmd/tools/vup.v
|
||||
cd /tmp/v_linux/v
|
||||
./v version
|
||||
./v up
|
||||
echo "Updated ./v version: $(./v version) | Current v version: $(v version)"
|
||||
|
||||
- name: Extract ZIP 4, with local changes, and with current vup.v
|
||||
run: |
|
||||
rm -rf /tmp/v_linux && unzip -q -d v_linux/ v_linux.zip && mv v_linux /tmp/v_linux
|
||||
rm -rf /tmp/v_linux/v/cmd/tools/vup && cp cmd/tools/vup.v /tmp/v_linux/v/cmd/tools/vup.v
|
||||
touch /tmp/v_linux/v/vlib/v/pref/local_file_not_present_in_master.c.v && rm /tmp/v_linux/v/examples/hello_world.v
|
||||
cd /tmp/v_linux/v
|
||||
./v version
|
||||
./v up
|
||||
echo "Updated ./v version: $(./v version) | Current v version: $(v version)"
|
Loading…
x
Reference in New Issue
Block a user