-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
99 lines (94 loc) · 3.37 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
99 lines (94 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
variables:
DOCKER_AUTHS: "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}"
stages:
- build-image
- check-format
- build
build-image:
stage: build-image
image: quay.io/buildah/stable
tags:
- shared
script:
- buildah login -u "$CI_REGISTRY_USER" -p"$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- >-
buildah build
--file "$CI_PROJECT_DIR/.ci/Dockerfile"
--cache-from "$CI_REGISTRY_IMAGE/cache"
--cache-to "$CI_REGISTRY_IMAGE/cache"
--layers
--tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
"$CI_PROJECT_DIR"
- buildah push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
check-format:
stage: check-format
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
tags:
- shared
script:
- pre-commit install-hooks
- pre-commit run --all-files
create_package_ubuntu:
stage: build
needs: [check-format]
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
tags:
- shared
script:
# Build instr_trace
- cmake .
- cmake --build .
# Run tests
# - ./bin/pipeline_test # TODO - fix this test
- ./bin/modified_code_check_test
- ./bin/transitions_check_test
- ./bin/reg_ranges_correctness_test_1
- ./bin/reg_ranges_correctness_test_2
- ./bin/reg_ranges_correctness_test_3
- ./bin/reg_ranges_correctness_test_4
- ./bin/reg_ranges_correctness_test_5
- ./bin/reg_ranges_correctness_test_6
- ./bin/reg_ranges_correctness_test_7
artifacts:
paths:
- bin/
- include/
- lib/
create_package_windows:
stage: build
needs: [check-format]
tags: [rewriting-windows] # Windows VM with cygwin, Visual Studio 16 2019
variables:
ARCHITECTURE: x64
script:
# Add cmake to the path
- export PATH="$PATH;C:\\Program Files\\CMake\\bin"
# Download and install DynamoRIO (instr_trace build/runtime dependency)
- curl -L https://github.com/DynamoRIO/dynamorio/releases/download/release_9.0.1/DynamoRIO-Windows-9.0.1.zip -o dynamorio-9.0.1.zip
- unzip -q dynamorio-9.0.1.zip -d C:\\
- export PATH="$PATH;C:\\DynamoRIO-Windows-9.0.1\\bin32"
# Download, build, and install boost (instr_trace build/runtime dependency)
- curl -L https://archives.boost.io/release/1.69.0/source/boost_1_69_0.zip -o boost_1_69_0.zip
- unzip -q boost_1_69_0.zip -d C:\\
- cd C:\\boost_1_69_0
- cmd.exe /C "CALL \"C:\\VS\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x86 && CALL \"bootstrap.bat\""
- >-
sed -i
's|using msvc ;|using msvc : 14.2 : "C:\\VS\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\cl.exe" ;|'
project-config.jam
- cmd.exe /C "CALL \"C:\\VS\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x86 && b2 --with-filesystem --with-program_options toolset=msvc-14.2 address-model=32 toolset=msvc variant=debug,release link=static runtime-link=static install" 2>&1
- export PATH="$PATH;C:\\Boost\\bin"
# Build instr_trace
- cd /home/vagrant/$CI_PROJECT_DIR
- cmake -G "Visual Studio 16 2019" -A Win32 .
- cmake --build . --config Release
# Run tests
# TODO - fix these tests (appears to be a weird Windows/cygwin interaction)
# - ./bin/Release/pipeline_test.exe
# - ./bin/Release/transitions_check_test.exe
# - ./bin/Release/modified_code_check_test.exe
artifacts:
paths:
- bin/
- include/
- lib/