diff --git a/.github/workflows/vpm_ci.yml b/.github/workflows/vpm_ci.yml index d642ece6f8..cc3d3b8716 100644 --- a/.github/workflows/vpm_ci.yml +++ b/.github/workflows/vpm_ci.yml @@ -15,16 +15,18 @@ concurrency: cancel-in-progress: true jobs: - setup: + setup-vpm: strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-14] + os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: path: vlang + - name: Show git version + run: git version - name: Build V if: runner.os != 'Windows' run: cd vlang && make -j4 && ./v doctor @@ -37,34 +39,34 @@ jobs: path: vlang key: ${{ runner.os }}-${{ github.sha }} - test: - needs: setup + test-vpm: + needs: setup-vpm strategy: matrix: include: - - os: ubuntu-20.04 + - os: ubuntu-latest cc: tcc - - os: ubuntu-20.04 + - os: ubuntu-latest cc: gcc - - os: ubuntu-20.04 + - os: ubuntu-latest cc: clang - - os: windows-2019 + - os: macos-latest + cc: clang + - os: windows-latest cc: tcc - - os: windows-2019 + - os: windows-latest cc: gcc - - os: windows-2019 + - os: windows-latest cc: msvc - - os: macos-14 - cc: clang fail-fast: false runs-on: ${{ matrix.os }} - env: - VFLAGS: -cc ${{ matrix.cc }} -d network steps: - name: Restore V cache uses: actions/cache/restore@v4 with: path: vlang key: ${{ runner.os }}-${{ github.sha }} + - name: Show git version + run: git version - name: Test - run: cd vlang && ./v test cmd/tools/vpm + run: cd vlang && ./v -cc ${{ matrix.cc }} -d network test cmd/tools/vpm diff --git a/cmd/tools/vpm/install_test.v b/cmd/tools/vpm/install_test.v index 2d9adf1f60..055c0007f5 100644 --- a/cmd/tools/vpm/install_test.v +++ b/cmd/tools/vpm/install_test.v @@ -146,7 +146,7 @@ fn test_get_installed_version() { // Create a tag -> latests commit and tag are at the same state, // but it should not be treated as a version installation, when there is another head branch. - res = cmd_ok(@LOCATION, 'git tag v0.1.0') + res = cmd_ok(@LOCATION, 'git tag v0.1.0 -m "some tag message"') // note: without a tag message, git will try to start an editor when you run this test locally, which will block mod.is_installed = false mod.get_installed() assert mod.is_installed diff --git a/cmd/tools/vpm/outdated_test.v b/cmd/tools/vpm/outdated_test.v index 7fa68dc984..de3a1d1165 100644 --- a/cmd/tools/vpm/outdated_test.v +++ b/cmd/tools/vpm/outdated_test.v @@ -55,9 +55,10 @@ fn test_outdated() { assert is_outdated(m) } res := cmd_ok(@LOCATION, '${vexe} outdated') - assert res.output.contains('Outdated modules:'), res.output - assert res.output.contains('pcre'), res.output - assert res.output.contains('vtray'), res.output - assert res.output.contains('nedpals.args'), res.output - assert !res.output.contains('libsodium'), res.output + output := res.output.all_after('Outdated modules:') + assert output.len > 0, output + assert output.contains('pcre'), output + assert output.contains('vtray'), output + assert output.contains('nedpals.args'), output + assert !output.contains('libsodium'), output } diff --git a/cmd/tools/vpm/settings.v b/cmd/tools/vpm/settings.v index 80f89ecf00..167eafc9c3 100644 --- a/cmd/tools/vpm/settings.v +++ b/cmd/tools/vpm/settings.v @@ -34,6 +34,7 @@ fn init_settings() VpmSettings { is_ci := os.getenv('CI') != '' mut logger := &log.Log{} + logger.set_output_stream(os.stderr()) if is_dbg { logger.set_level(.debug) }