|
1 | | -# Fast builds |
2 | 1 | name: FastBuild |
3 | 2 |
|
4 | 3 | on: workflow_call |
|
11 | 10 | INSTL_DIR : "${{github.workspace}}/../install-dir" |
12 | 11 |
|
13 | 12 | jobs: |
14 | | - FastBuild: |
15 | | - name: Fast builds |
16 | | - container: |
| 13 | + FastBuild_Linux: |
| 14 | + name: Fast builds (Linux) |
| 15 | + runs-on: ubuntu-latest |
| 16 | + container: |
17 | 17 | image: rbanka974/umf-ubuntu-20.04:latest |
18 | | - if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' |
| 18 | + |
19 | 19 | env: |
20 | 20 | VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" |
21 | 21 | strategy: |
22 | 22 | matrix: |
23 | 23 | include: |
24 | | - - os: windows-latest |
25 | | - disjoint: 'OFF' |
26 | | - build_tests: 'ON' |
27 | | - simple_cmake: 'OFF' |
28 | | - # pure C build (Windows) |
29 | | - - os: windows-latest |
30 | | - disjoint: 'OFF' |
31 | | - # Tests' building is off for a pure C build |
32 | | - build_tests: 'OFF' |
33 | | - simple_cmake: 'OFF' |
34 | 24 | - os: ubuntu-latest |
35 | 25 | disjoint: 'ON' |
36 | 26 | build_tests: 'ON' |
37 | | - # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command |
38 | 27 | extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON' |
39 | 28 | simple_cmake: 'OFF' |
40 | | - # pure C build (Linux) |
41 | 29 | - os: ubuntu-latest |
42 | 30 | disjoint: 'OFF' |
43 | | - # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command |
44 | | - # Tests' building is off for a pure C build |
45 | 31 | build_tests: 'OFF' |
46 | 32 | extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON' |
47 | 33 | simple_cmake: 'OFF' |
48 | | - # simplest CMake on ubuntu-latest |
49 | 34 | - os: ubuntu-latest |
50 | 35 | disjoint: 'OFF' |
51 | 36 | build_tests: 'ON' |
52 | 37 | extra_build_options: '-DCMAKE_BUILD_TYPE=Release' |
53 | 38 | simple_cmake: 'ON' |
54 | | - # simplest CMake ubuntu-20.04 |
55 | 39 | - os: ubuntu-20.04 |
56 | 40 | disjoint: 'OFF' |
57 | 41 | build_tests: 'ON' |
58 | 42 | extra_build_options: '-DCMAKE_BUILD_TYPE=Release' |
59 | 43 | simple_cmake: 'ON' |
60 | | - runs-on: ${{ (matrix.os == 'ubuntu-latest' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }} |
61 | 44 |
|
62 | 45 | steps: |
63 | 46 | - name: Checkout repository |
64 | 47 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
65 | 48 | with: |
66 | 49 | fetch-depth: 0 |
67 | 50 |
|
68 | | - - name: Initialize vcpkg |
69 | | - if: matrix.os == 'windows-latest' |
70 | | - uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 |
71 | | - with: |
72 | | - vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 |
73 | | - vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg |
74 | | - vcpkgJsonGlob: '**/vcpkg.json' |
75 | | - |
76 | | - - name: Install dependencies (windows-latest) |
77 | | - if: matrix.os == 'windows-latest' |
78 | | - run: vcpkg install |
79 | | - shell: pwsh # Specifies PowerShell as the shell for running the script. |
80 | | - |
81 | 51 | - name: Install dependencies (ubuntu-latest) |
82 | | - if: matrix.os == 'ubuntu-latest' |
83 | 52 | run: | |
84 | 53 | sudo apt-get update |
85 | 54 | sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev |
|
92 | 61 | .github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package |
93 | 62 |
|
94 | 63 | - name: Set ptrace value for IPC test (on Linux only) |
95 | | - if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }} |
96 | 64 | run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" |
97 | 65 |
|
98 | 66 | - name: Configure CMake |
@@ -136,8 +104,84 @@ jobs: |
136 | 104 | working-directory: ${{env.BUILD_DIR}} |
137 | 105 | run: ctest --output-on-failure --test-dir test -C Release |
138 | 106 |
|
139 | | - # TODO: We could add some script to verify metadata of dll's (selected fields, perhaps) |
140 | | - # ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details |
| 107 | + FastBuild_Windows: |
| 108 | + name: Fast builds (Windows) |
| 109 | + runs-on: windows-latest |
| 110 | + |
| 111 | + env: |
| 112 | + VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" |
| 113 | + strategy: |
| 114 | + matrix: |
| 115 | + include: |
| 116 | + - os: windows-latest |
| 117 | + disjoint: 'OFF' |
| 118 | + build_tests: 'ON' |
| 119 | + simple_cmake: 'OFF' |
| 120 | + - os: windows-latest |
| 121 | + disjoint: 'OFF' |
| 122 | + build_tests: 'OFF' |
| 123 | + simple_cmake: 'OFF' |
| 124 | + |
| 125 | + steps: |
| 126 | + - name: Checkout repository |
| 127 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 128 | + with: |
| 129 | + fetch-depth: 0 |
| 130 | + |
| 131 | + - name: Initialize vcpkg |
| 132 | + if: matrix.os == 'windows-latest' |
| 133 | + uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 |
| 134 | + with: |
| 135 | + vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 |
| 136 | + vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg |
| 137 | + vcpkgJsonGlob: '**/vcpkg.json' |
| 138 | + |
| 139 | + - name: Install dependencies (windows-latest) |
| 140 | + if: matrix.os == 'windows-latest' |
| 141 | + run: vcpkg install |
| 142 | + shell: pwsh |
| 143 | + |
| 144 | + - name: Configure CMake |
| 145 | + if: matrix.simple_cmake == 'OFF' |
| 146 | + run: > |
| 147 | + cmake |
| 148 | + -B ${{env.BUILD_DIR}} |
| 149 | + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" |
| 150 | + -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" |
| 151 | + -DUMF_FORMAT_CODE_STYLE=OFF |
| 152 | + -DUMF_DEVELOPER_MODE=ON |
| 153 | + -DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}} |
| 154 | + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON |
| 155 | + -DUMF_BUILD_TESTS=${{matrix.build_tests}} |
| 156 | + -DUMF_BUILD_EXAMPLES=ON |
| 157 | + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON |
| 158 | + -DUMF_BUILD_CUDA_PROVIDER=ON |
| 159 | + -DUMF_TESTS_FAIL_ON_SKIP=ON |
| 160 | + -DUMF_BUILD_SHARED_LIBRARY=ON |
| 161 | + ${{matrix.extra_build_options}} |
| 162 | +
|
| 163 | + - name: Configure CMake (simple) |
| 164 | + if: matrix.simple_cmake == 'ON' |
| 165 | + run: > |
| 166 | + cmake |
| 167 | + -B ${{env.BUILD_DIR}} |
| 168 | + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" |
| 169 | + -DUMF_BUILD_SHARED_LIBRARY=ON |
| 170 | + -DUMF_TESTS_FAIL_ON_SKIP=ON |
| 171 | + ${{matrix.extra_build_options}} |
| 172 | +
|
| 173 | + - name: Build |
| 174 | + run: cmake --build ${{env.BUILD_DIR}} --config Release -j |
| 175 | + |
| 176 | + - name: Run examples |
| 177 | + working-directory: ${{env.BUILD_DIR}} |
| 178 | + run: ctest --output-on-failure --test-dir examples -C Release |
| 179 | + |
| 180 | + - name: Run tests |
| 181 | + if: matrix.build_tests == 'ON' |
| 182 | + working-directory: ${{env.BUILD_DIR}} |
| 183 | + run: ctest --output-on-failure --test-dir test -C Release |
| 184 | + |
141 | 185 | - name: Print metadata of our dll's |
142 | 186 | if: matrix.os == 'windows-latest' |
143 | 187 | run: | |
|
0 commit comments