V.js: on linux -lm is needed
							parent
							
								
									ca239fcf98
								
							
						
					
					
						commit
						083d747302
					
				
							
								
								
									
										28
									
								
								.travis.yml
								
								
								
								
							
							
						
						
									
										28
									
								
								.travis.yml
								
								
								
								
							| 
						 | 
					@ -6,6 +6,10 @@ matrix:
 | 
				
			||||||
      dist: xenial
 | 
					      dist: xenial
 | 
				
			||||||
      sudo: required
 | 
					      sudo: required
 | 
				
			||||||
      addons:
 | 
					      addons:
 | 
				
			||||||
 | 
					        snaps:
 | 
				
			||||||
 | 
					          - name: node
 | 
				
			||||||
 | 
					            channel: latest/edge
 | 
				
			||||||
 | 
					            confinement: classic
 | 
				
			||||||
        apt:
 | 
					        apt:
 | 
				
			||||||
          sources:
 | 
					          sources:
 | 
				
			||||||
            - ubuntu-toolchain-r-test
 | 
					            - ubuntu-toolchain-r-test
 | 
				
			||||||
| 
						 | 
					@ -75,11 +79,27 @@ script:
 | 
				
			||||||
      ./v test v
 | 
					      ./v test v
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
  - |
 | 
					  - |
 | 
				
			||||||
    if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
 | 
					    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
 | 
				
			||||||
 | 
					      ## aliases do not work for some reason in travis, just use full commands :-|
 | 
				
			||||||
 | 
					      echo "Nodejs version:"
 | 
				
			||||||
 | 
					      snap run node --version      
 | 
				
			||||||
      # Build hi.js
 | 
					      # Build hi.js
 | 
				
			||||||
      echo "println('Hello from V.js')" > hi.js
 | 
					      echo "fn main(){ println('Hello from V.js') }" > hi.v
 | 
				
			||||||
      ./v -o hi.js hi.v && node hi.js
 | 
					      ./v -o hi.js hi.v
 | 
				
			||||||
      
 | 
					      snap run node hi.js
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					  - |
 | 
				
			||||||
 | 
					    if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
 | 
				
			||||||
 | 
					      echo "Nodejs version:"
 | 
				
			||||||
 | 
					      node --version      
 | 
				
			||||||
 | 
					      # Build hi.js
 | 
				
			||||||
 | 
					      echo "fn main(){ println('Hello from V.js') }" > hi.v
 | 
				
			||||||
 | 
					      ./v -o hi.js hi.v
 | 
				
			||||||
 | 
					      ## the node on osx requires --harmony-class-fields for now
 | 
				
			||||||
 | 
					      node --harmony-class-fields hi.js
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					  - |
 | 
				
			||||||
 | 
					    if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
 | 
				
			||||||
      # Build Vid
 | 
					      # Build Vid
 | 
				
			||||||
      git clone https://github.com/vlang/vid
 | 
					      git clone https://github.com/vlang/vid
 | 
				
			||||||
      cd vid && ../v -debug -o vid .
 | 
					      cd vid && ../v -debug -o vid .
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -168,6 +168,11 @@ fn (v mut V) cc() {
 | 
				
			||||||
			a << ' -ldl '
 | 
								a << ' -ldl '
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if v.os == .js && os.user_os() == 'linux' {
 | 
				
			||||||
 | 
							a << '-lm'
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	if v.os == .windows {
 | 
						if v.os == .windows {
 | 
				
			||||||
		a << '-DUNICODE -D_UNICODE'
 | 
							a << '-DUNICODE -D_UNICODE'
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue