Skip to content

Commit

Permalink
ci: run the v up tests on macos as well (vlang#21411)
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman authored May 3, 2024
1 parent 4cb5949 commit 065399e
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/vup_works.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,49 +23,61 @@ concurrency:
cancel-in-progress: true

jobs:
v-up-works-ubuntu:
runs-on: ubuntu-latest
timeout-minutes: 30
v-up-works-nix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
zip: v_linux.zip
- os: macos-13
zip: v_macos_x86_64.zip
- os: macos-14
zip: v_macos_arm64.zip
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
VDIR: /tmp/v_from_release_zip
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
run: wget https://github.com/vlang/v/releases/latest/download/${{ matrix.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
rm -rf $VDIR && unzip -q -d v_from_release/ ${{ matrix.zip }} && mv v_from_release $VDIR
cd $VDIR/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
rm -rf $VDIR && unzip -q -d v_from_release/ ${{ matrix.zip }} && mv v_from_release $VDIR
touch $VDIR/v/vlib/v/pref/local_file_not_present_in_master.c.v && rm $VDIR/v/examples/hello_world.v
cd $VDIR/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
rm -rf $VDIR && unzip -q -d v_from_release/ ${{ matrix.zip }} && mv v_from_release $VDIR
rm -rf $VDIR/v/cmd/tools/vup && cp cmd/tools/vup.v $VDIR/v/cmd/tools/vup.v
cd $VDIR/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
rm -rf $VDIR && unzip -q -d v_from_release/ ${{ matrix.zip }} && mv v_from_release $VDIR
rm -rf $VDIR/v/cmd/tools/vup && cp cmd/tools/vup.v $VDIR/v/cmd/tools/vup.v
touch $VDIR/v/vlib/v/pref/local_file_not_present_in_master.c.v && rm $VDIR/v/examples/hello_world.v
cd $VDIR/v
./v version
./v up
echo "Updated ./v version: $(./v version) | Current v version: $(v version)"

0 comments on commit 065399e

Please sign in to comment.