Skip to content

Commit bfc9dd4

Browse files
Merge pull request #600 from ldorau/Run_fast_builds_when_Spellcheck_and_CodeStyle_succeed
Run fast builds when Spellcheck and CodeStyle succeed
2 parents 64d18bd + 47d6ea1 commit bfc9dd4

File tree

2 files changed

+142
-130
lines changed

2 files changed

+142
-130
lines changed

.github/workflows/fast.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Fast builds
2+
name: FastBuild
3+
4+
on: workflow_call
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
FastBuild:
11+
name: Fast builds
12+
env:
13+
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"
14+
strategy:
15+
matrix:
16+
include:
17+
- os: windows-latest
18+
disjoint: 'OFF'
19+
build_tests: 'ON'
20+
simple_cmake: 'OFF'
21+
# pure C build (Windows)
22+
- os: windows-latest
23+
disjoint: 'OFF'
24+
# Tests' building is off for a pure C build
25+
build_tests: 'OFF'
26+
simple_cmake: 'OFF'
27+
- os: ubuntu-latest
28+
disjoint: 'ON'
29+
build_tests: 'ON'
30+
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
31+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
32+
simple_cmake: 'OFF'
33+
# pure C build (Linux)
34+
- os: ubuntu-latest
35+
disjoint: 'OFF'
36+
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
37+
# Tests' building is off for a pure C build
38+
build_tests: 'OFF'
39+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
40+
simple_cmake: 'OFF'
41+
# simplest CMake on ubuntu-latest
42+
- os: ubuntu-latest
43+
disjoint: 'OFF'
44+
build_tests: 'ON'
45+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
46+
simple_cmake: 'ON'
47+
# simplest CMake ubuntu-20.04
48+
- os: ubuntu-20.04
49+
disjoint: 'OFF'
50+
build_tests: 'ON'
51+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
52+
simple_cmake: 'ON'
53+
runs-on: ${{matrix.os}}
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
58+
59+
- name: Initialize vcpkg
60+
if: matrix.os == 'windows-latest'
61+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
62+
with:
63+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
64+
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
65+
vcpkgJsonGlob: '**/vcpkg.json'
66+
67+
- name: Install dependencies
68+
if: matrix.os == 'windows-latest'
69+
run: vcpkg install
70+
shell: pwsh # Specifies PowerShell as the shell for running the script.
71+
72+
- name: Install apt packages (ubuntu-latest)
73+
if: matrix.os == 'ubuntu-latest'
74+
run: |
75+
sudo apt-get update
76+
sudo apt-get install -y cmake libjemalloc-dev libhwloc-dev libnuma-dev libtbb-dev
77+
78+
- name: Install apt packages (ubuntu-20.04)
79+
if: matrix.os == 'ubuntu-20.04'
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install -y cmake libjemalloc-dev libnuma-dev libtbb-dev
83+
.github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package
84+
85+
- name: Set ptrace value for IPC test (on Linux only)
86+
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }}
87+
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
88+
89+
- name: Configure CMake
90+
if: matrix.simple_cmake == 'OFF'
91+
run: >
92+
cmake
93+
-B ${{github.workspace}}/build
94+
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
95+
-DUMF_FORMAT_CODE_STYLE=OFF
96+
-DUMF_DEVELOPER_MODE=ON
97+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
98+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
99+
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
100+
-DUMF_BUILD_EXAMPLES=ON
101+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
102+
-DUMF_TESTS_FAIL_ON_SKIP=ON
103+
-DUMF_BUILD_SHARED_LIBRARY=ON
104+
${{matrix.extra_build_options}}
105+
106+
- name: Configure CMake (simple)
107+
if: matrix.simple_cmake == 'ON'
108+
run: >
109+
cmake
110+
-B ${{github.workspace}}/build
111+
-DUMF_BUILD_SHARED_LIBRARY=ON
112+
-DUMF_TESTS_FAIL_ON_SKIP=ON
113+
${{matrix.extra_build_options}}
114+
115+
- name: Build
116+
run: cmake --build ${{github.workspace}}/build --config Release -j
117+
118+
- name: Run examples
119+
working-directory: ${{github.workspace}}/build
120+
run: ctest --output-on-failure --test-dir examples -C Release
121+
122+
- name: Run tests
123+
if: matrix.build_tests == 'ON'
124+
working-directory: ${{github.workspace}}/build
125+
run: ctest --output-on-failure --test-dir test -C Release
126+
127+
- name: check /DEPENDENTLOADFLAG (Windows only)
128+
if: matrix.os == 'windows-latest'
129+
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{github.workspace}}/build/bin/Release/umf.dll
130+
shell: pwsh
131+
132+
- name: check /DEPENDENTLOADFLAG in umf_proxy.dll
133+
if: matrix.os == 'windows-latest'
134+
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll
135+
shell: pwsh

.github/workflows/pr_push.yml

Lines changed: 7 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -15,133 +15,6 @@ permissions:
1515
contents: read
1616

1717
jobs:
18-
FastBuild:
19-
name: Fast build
20-
env:
21-
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"
22-
strategy:
23-
matrix:
24-
include:
25-
- os: windows-latest
26-
disjoint: 'OFF'
27-
build_tests: 'ON'
28-
simple_cmake: 'OFF'
29-
# pure C build (Windows)
30-
- os: windows-latest
31-
disjoint: 'OFF'
32-
# Tests' building is off for a pure C build
33-
build_tests: 'OFF'
34-
simple_cmake: 'OFF'
35-
- os: ubuntu-latest
36-
disjoint: 'ON'
37-
build_tests: 'ON'
38-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
39-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
40-
simple_cmake: 'OFF'
41-
# pure C build (Linux)
42-
- os: ubuntu-latest
43-
disjoint: 'OFF'
44-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
45-
# Tests' building is off for a pure C build
46-
build_tests: 'OFF'
47-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
48-
simple_cmake: 'OFF'
49-
# simplest CMake on ubuntu-latest
50-
- os: ubuntu-latest
51-
disjoint: 'OFF'
52-
build_tests: 'ON'
53-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
54-
simple_cmake: 'ON'
55-
# simplest CMake ubuntu-20.04
56-
- os: ubuntu-20.04
57-
disjoint: 'OFF'
58-
build_tests: 'ON'
59-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
60-
simple_cmake: 'ON'
61-
runs-on: ${{matrix.os}}
62-
63-
steps:
64-
- name: Checkout repository
65-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
66-
67-
- name: Initialize vcpkg
68-
if: matrix.os == 'windows-latest'
69-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
70-
with:
71-
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
72-
vcpkgDirectory: ${{github.workspace}}/build/vcpkg
73-
vcpkgJsonGlob: '**/vcpkg.json'
74-
75-
- name: Install dependencies
76-
if: matrix.os == 'windows-latest'
77-
run: vcpkg install
78-
shell: pwsh # Specifies PowerShell as the shell for running the script.
79-
80-
- name: Install apt packages (ubuntu-latest)
81-
if: matrix.os == 'ubuntu-latest'
82-
run: |
83-
sudo apt-get update
84-
sudo apt-get install -y cmake libjemalloc-dev libhwloc-dev libnuma-dev libtbb-dev
85-
86-
- name: Install apt packages (ubuntu-20.04)
87-
if: matrix.os == 'ubuntu-20.04'
88-
run: |
89-
sudo apt-get update
90-
sudo apt-get install -y cmake libjemalloc-dev libnuma-dev libtbb-dev
91-
.github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package
92-
93-
- name: Set ptrace value for IPC test (on Linux only)
94-
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }}
95-
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
96-
97-
- name: Configure CMake
98-
if: matrix.simple_cmake == 'OFF'
99-
run: >
100-
cmake
101-
-B ${{github.workspace}}/build
102-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
103-
-DUMF_FORMAT_CODE_STYLE=OFF
104-
-DUMF_DEVELOPER_MODE=ON
105-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
106-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
107-
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
108-
-DUMF_BUILD_EXAMPLES=ON
109-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
110-
-DUMF_TESTS_FAIL_ON_SKIP=ON
111-
-DUMF_BUILD_SHARED_LIBRARY=ON
112-
${{matrix.extra_build_options}}
113-
114-
- name: Configure CMake (simple)
115-
if: matrix.simple_cmake == 'ON'
116-
run: >
117-
cmake
118-
-B ${{github.workspace}}/build
119-
-DUMF_BUILD_SHARED_LIBRARY=ON
120-
-DUMF_TESTS_FAIL_ON_SKIP=ON
121-
${{matrix.extra_build_options}}
122-
123-
- name: Build
124-
run: cmake --build ${{github.workspace}}/build --config Release -j
125-
126-
- name: Run examples
127-
working-directory: ${{github.workspace}}/build
128-
run: ctest --output-on-failure --test-dir examples -C Release
129-
130-
- name: Run tests
131-
if: matrix.build_tests == 'ON'
132-
working-directory: ${{github.workspace}}/build
133-
run: ctest --output-on-failure --test-dir test -C Release
134-
135-
- name: check /DEPENDENTLOADFLAG (Windows only)
136-
if: matrix.os == 'windows-latest'
137-
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{github.workspace}}/build/bin/Release/umf.dll
138-
shell: pwsh
139-
140-
- name: check /DEPENDENTLOADFLAG in umf_proxy.dll
141-
if: matrix.os == 'windows-latest'
142-
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll
143-
shell: pwsh
144-
14518
CodeStyle:
14619
name: Coding style
14720
runs-on: ubuntu-latest
@@ -197,15 +70,19 @@ jobs:
19770

19871
Spellcheck:
19972
uses: ./.github/workflows/spellcheck.yml
73+
FastBuild:
74+
name: Fast builds
75+
needs: [Spellcheck, CodeStyle]
76+
uses: ./.github/workflows/fast.yml
20077
Build:
20178
name: Basic builds
202-
needs: [Spellcheck, FastBuild, CodeStyle]
79+
needs: [FastBuild]
20380
uses: ./.github/workflows/basic.yml
20481
Sanitizers:
205-
needs: [Spellcheck, FastBuild, CodeStyle]
82+
needs: [FastBuild]
20683
uses: ./.github/workflows/sanitizers.yml
20784
Qemu:
208-
needs: [Spellcheck, FastBuild, CodeStyle]
85+
needs: [FastBuild]
20986
uses: ./.github/workflows/qemu.yml
21087
Benchmarks:
21188
needs: [Build]

0 commit comments

Comments
 (0)