ci: fix the `g++` build and the `alpine-musl` task
parent
9bf6d57032
commit
3467ab1551
|
@ -257,18 +257,20 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build V
|
- name: Show Environment
|
||||||
run: |
|
|
||||||
make CC=clang
|
|
||||||
- name: Show PWD and Environment
|
|
||||||
run: |
|
run: |
|
||||||
echo "PWD:"
|
echo "PWD:"
|
||||||
pwd
|
pwd
|
||||||
echo "ENVIRONMENT"
|
echo "ENVIRONMENT:"
|
||||||
env
|
env
|
||||||
|
echo "C Compiler:"
|
||||||
|
gcc --version
|
||||||
|
|
||||||
|
- name: Build V
|
||||||
|
run: CC=gcc make
|
||||||
|
|
||||||
- name: Test V fixed tests
|
- name: Test V fixed tests
|
||||||
run: |
|
run: ./v -silent test-self
|
||||||
./v -silent test-self
|
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
needs: no-scheduling
|
needs: no-scheduling
|
||||||
|
|
|
@ -552,13 +552,16 @@ fn (mut v Builder) cc() {
|
||||||
v.setup_output_name()
|
v.setup_output_name()
|
||||||
|
|
||||||
if v.pref.os != .windows && ccompiler.contains('++') {
|
if v.pref.os != .windows && ccompiler.contains('++') {
|
||||||
for file in v.parsed_files {
|
cpp_atomic_h_path := '${@VEXEROOT}/thirdparty/stdatomic/nix/cpp/atomic.h'
|
||||||
if file.imports.any(it.mod.contains('sync')) {
|
if !os.exists(cpp_atomic_h_path) {
|
||||||
x := @VEXE + ' run ' +
|
for file in v.parsed_files {
|
||||||
os.join_path(@VEXEROOT, 'thirdparty', 'stdatomic', 'nix', 'cpp', 'gen.v') +
|
if file.imports.any(it.mod.contains('sync')) {
|
||||||
' ' + ccompiler
|
$if trace_stdatomic_gen {
|
||||||
os.execute(x)
|
eprintln('> creating $cpp_atomic_h_path ...')
|
||||||
break
|
}
|
||||||
|
os.execute('$vexe run ${@VEXEROOT}/thirdparty/stdatomic/nix/cpp/gen.v $ccompiler')
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue