diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bfd36b7fb5355c3f0cb9eb0b6f5c4b1c729bcef7..3077020ecd11e2c3226b76b943bccd432708b8b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,15 +8,10 @@ cache: variables: REPO_DIR: gitlab.com/elixxir - REPO_NAME: gpumaths + REPO_NAME: gpumathsnative DOCKER_IMAGE: elixxirlabs/cuda-go:latest - MIN_CODE_COVERAGE: "20.0" before_script: - ## - ## Go Setup - ## - - go version || echo "Go executable not found." - echo $CI_BUILD_REF - echo $CI_PROJECT_DIR - echo $PWD @@ -27,15 +22,9 @@ before_script: - chmod 700 ~/.ssh - ssh-keyscan -t rsa gitlab.com > ~/.ssh/known_hosts - git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/" - - export GOFLAGS=-mod=vendor - - export PATH=$HOME/go/bin:$PATH - - export GOPRIVATE=gitlab.com/elixxir/* stages: - setup - - test - - build - - tag - trigger_server - trigger_release_server @@ -45,63 +34,13 @@ setup: except: - tags script: - - go mod vendor -v - - go build ./... - - go mod tidy - cd cgbnBindings/powm - make turing - make devinstall artifacts: paths: - - vendor/ - lib/ -test: - stage: test - image: $DOCKER_IMAGE - tags: - - gpu - except: - - tags - script: - - mkdir -p /opt/xxnetwork/lib/ - - mkdir -p /opt/xxnetwork/include - - cat /usr/local/cuda/version.txt - - nvidia-smi - - apt-get update - - apt-get install bc -y - - mkdir -p testdata - # Test coverage - - go test -v -tags gpu -coverprofile=testdata/coverage.out -covermode atomic -coverpkg ./... -race ./... - # Is it possible to correctly merge the coverage data between these two build tags? - # (Or simply ignore coverage for non-CUDA dummy code paths) - - go test -v -coverprofile=testdata/coverage-noncuda.out -covermode atomic -coverpkg ./... -race ./... - # Get coverage data - - go tool cover -func=testdata/coverage.out - - go tool cover -html=testdata/coverage.out -o testdata/coverage.html - - go tool cover -func=testdata/coverage-noncuda.out - - go tool cover -html=testdata/coverage-noncuda.out -o testdata/coverage-noncuda.html - - # Test Coverage Check - - go tool cover -func=testdata/coverage.out | grep "total:" | awk '{print $3}' | sed 's/\%//g' > testdata/coverage-percentage.txt - - export CODE_CHECK=$(echo "$(cat testdata/coverage-percentage.txt) >= $MIN_CODE_COVERAGE" | bc -l) - - (if [ "$CODE_CHECK" == "1" ]; then echo "Minimum coverage of $MIN_CODE_COVERAGE succeeded"; else echo "Minimum coverage of $MIN_CODE_COVERAGE failed"; exit 1; fi); - artifacts: - paths: - - testdata/ - -build: - stage: build - image: $DOCKER_IMAGE - except: - - tags - script: - - mkdir -p release - - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' ./... - artifacts: - paths: - - release/ - # TODO(?): have server pull in the latest from release/master automatically for this pipeline, if possible trigger_server: stage: trigger_server diff --git a/cgbnBindings/powm/Makefile b/cgbnBindings/powm/Makefile index b70feb15d8b7bde25da3b5e7806d1e845258a35b..86576a3f4571fd0a764956c2993889df97a22f35 100644 --- a/cgbnBindings/powm/Makefile +++ b/cgbnBindings/powm/Makefile @@ -23,11 +23,12 @@ clean: devinstall: mkdir -p ../../lib mv libpowmo*.so ../../lib + cp powm_odd_export.h ../../lib install: mkdir -p /opt/xxnetwork/lib mkdir -p /opt/xxnetwork/include - cp libpowmo*.so /opt/xxnetwork/lib + mv libpowmo*.so /opt/xxnetwork/lib cp powm_odd_export.h /opt/xxnetwork/include kepler: