Skip to content

chore: remove unsafe malloc in hostname #621

chore: remove unsafe malloc in hostname

chore: remove unsafe malloc in hostname #621

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
winos-test:
runs-on: windows-latest
env:
VFLAGS: -cc tcc
VJOBS: 1
VTEST_SHOW_START: 1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: coreutils
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
shell: bash
run: |
# Build V
cd v && ./make.bat -tcc
echo "adding '${PWD}' to PATH"
echo "${PWD}" >> $GITHUB_PATH
- name: Download uutils/coreutils
uses: engineerd/[email protected]
with:
name: 'coreutils.exe'
url: 'https://github.com/uutils/coreutils/releases/download/0.0.17/coreutils-0.0.17-x86_64-pc-windows-msvc.zip'
pathInArchive: 'coreutils-0.0.17-x86_64-pc-windows-msvc/coreutils.exe'
- name: V doctor
shell: bash
run: |
# V doctor
v doctor
- name: Info
shell: bash
run: |
## Info
# environment
echo "## environment"
echo "CI='${CI}'"
# tooling info display
echo "## testing/tooling"
coreutils
which tcc >/dev/null 2>&1 && (tcc --version | head -1) || true
v --version
- name: Build all
shell: bash
run: |
# Build all
cd coreutils && v build.vsh
- name: Run tests
shell: bash
run: |
# Run tests
cd coreutils && v test .
ubuntu-fast-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
run: cd v && make && sudo ./v symlink && cd -
- name: Checkout Coreutils (for tests)
uses: actions/checkout@v2
with:
path: coreutils
- name: V doctor
run: v doctor
- name: Ensure everything is formatted
run: cd coreutils && make testfmt
- name: Build all
run: cd coreutils && v run build.vsh
- name: Debug uptime_nix_test.v
run: cd coreutils && v -d trace_same_results -stats src/uptime/uptime_nix_test.v
- name: Run tests
run: cd coreutils && make test
ubuntu-prod-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
run: cd v && make && sudo ./v symlink && cd -
- name: Checkout Coreutils (for tests)
uses: actions/checkout@v2
with:
path: coreutils
- name: Build all with -prod
run: cd coreutils && v run build.vsh -prod
- name: Run tests
run: cd coreutils && make test
ubuntu-gnu-coreutils:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
run: cd v && make && sudo ./v symlink && cd -
- name: Checkout Coreutils (for tests)
uses: actions/checkout@v2
with:
path: coreutils
- name: Build all
run: cd coreutils && v run build.vsh
- name: Native utils diagnostics (before GNU coreutils)
run: |
sleep --version
uptime --version
- name: Setup the original GNU coreutils for comparison
uses: ShenTengTu/setup-gnu-coreutils-action@v1
- name: Test GNU coreutils uptime
run: uptime --version
- name: Run tests
run: cd coreutils && GNU_COREUTILS_INSTALLED=1 make test