mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
ci: fix CI=name ./v -d network test cmd/tools/vpm/
; update the image runners in vpm_ci.yml (#23628)
This commit is contained in:
parent
b8c7892f5e
commit
e68fab82c4
4 changed files with 25 additions and 21 deletions
32
.github/workflows/vpm_ci.yml
vendored
32
.github/workflows/vpm_ci.yml
vendored
|
@ -15,16 +15,18 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup-vpm:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, windows-2019, macos-14]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: vlang
|
path: vlang
|
||||||
|
- name: Show git version
|
||||||
|
run: git version
|
||||||
- name: Build V
|
- name: Build V
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: cd vlang && make -j4 && ./v doctor
|
run: cd vlang && make -j4 && ./v doctor
|
||||||
|
@ -37,34 +39,34 @@ jobs:
|
||||||
path: vlang
|
path: vlang
|
||||||
key: ${{ runner.os }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ github.sha }}
|
||||||
|
|
||||||
test:
|
test-vpm:
|
||||||
needs: setup
|
needs: setup-vpm
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-latest
|
||||||
cc: tcc
|
cc: tcc
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-latest
|
||||||
cc: gcc
|
cc: gcc
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-latest
|
||||||
cc: clang
|
cc: clang
|
||||||
- os: windows-2019
|
- os: macos-latest
|
||||||
|
cc: clang
|
||||||
|
- os: windows-latest
|
||||||
cc: tcc
|
cc: tcc
|
||||||
- os: windows-2019
|
- os: windows-latest
|
||||||
cc: gcc
|
cc: gcc
|
||||||
- os: windows-2019
|
- os: windows-latest
|
||||||
cc: msvc
|
cc: msvc
|
||||||
- os: macos-14
|
|
||||||
cc: clang
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
|
||||||
VFLAGS: -cc ${{ matrix.cc }} -d network
|
|
||||||
steps:
|
steps:
|
||||||
- name: Restore V cache
|
- name: Restore V cache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: vlang
|
path: vlang
|
||||||
key: ${{ runner.os }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ github.sha }}
|
||||||
|
- name: Show git version
|
||||||
|
run: git version
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cd vlang && ./v test cmd/tools/vpm
|
run: cd vlang && ./v -cc ${{ matrix.cc }} -d network test cmd/tools/vpm
|
||||||
|
|
|
@ -146,7 +146,7 @@ fn test_get_installed_version() {
|
||||||
|
|
||||||
// Create a tag -> latests commit and tag are at the same state,
|
// 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.
|
// 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.is_installed = false
|
||||||
mod.get_installed()
|
mod.get_installed()
|
||||||
assert mod.is_installed
|
assert mod.is_installed
|
||||||
|
|
|
@ -55,9 +55,10 @@ fn test_outdated() {
|
||||||
assert is_outdated(m)
|
assert is_outdated(m)
|
||||||
}
|
}
|
||||||
res := cmd_ok(@LOCATION, '${vexe} outdated')
|
res := cmd_ok(@LOCATION, '${vexe} outdated')
|
||||||
assert res.output.contains('Outdated modules:'), res.output
|
output := res.output.all_after('Outdated modules:')
|
||||||
assert res.output.contains('pcre'), res.output
|
assert output.len > 0, output
|
||||||
assert res.output.contains('vtray'), res.output
|
assert output.contains('pcre'), output
|
||||||
assert res.output.contains('nedpals.args'), res.output
|
assert output.contains('vtray'), output
|
||||||
assert !res.output.contains('libsodium'), res.output
|
assert output.contains('nedpals.args'), output
|
||||||
|
assert !output.contains('libsodium'), output
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ fn init_settings() VpmSettings {
|
||||||
is_ci := os.getenv('CI') != ''
|
is_ci := os.getenv('CI') != ''
|
||||||
|
|
||||||
mut logger := &log.Log{}
|
mut logger := &log.Log{}
|
||||||
|
logger.set_output_stream(os.stderr())
|
||||||
if is_dbg {
|
if is_dbg {
|
||||||
logger.set_level(.debug)
|
logger.set_level(.debug)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue