Skip to content

Commit e00f6ad

Browse files
committed
Merge branch 'master' of https://github.com/learning-process/parallel_programming_course into an/change-define
# Conflicts: # .github/workflows/mac.yml
2 parents 11f586e + 579cc16 commit e00f6ad

File tree

18 files changed

+230
-480
lines changed

18 files changed

+230
-480
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @aobolensk @allnes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Archive installed package
2+
inputs:
3+
path:
4+
description: Directory to archive
5+
required: true
6+
name:
7+
description: Artifact name
8+
required: true
9+
runs:
10+
using: composite
11+
steps:
12+
- id: set-archive
13+
shell: bash
14+
run: |
15+
if [ "${RUNNER_OS}" = "Windows" ]; then
16+
echo "archive=${{ inputs.name }}.zip" >> "$GITHUB_OUTPUT"
17+
else
18+
echo "archive=${{ inputs.name }}.tar.gz" >> "$GITHUB_OUTPUT"
19+
fi
20+
- name: Compress directory (unix)
21+
if: runner.os != 'Windows'
22+
shell: bash
23+
run: tar -czvf "${{ steps.set-archive.outputs.archive }}" -C "${{ inputs.path }}" .
24+
- name: Compress directory (windows)
25+
if: runner.os == 'Windows'
26+
shell: pwsh
27+
run: Compress-Archive -Path ${{ inputs.path }} -DestinationPath ${{ steps.set-archive.outputs.archive }}
28+
- name: Upload artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: ${{ inputs.name }}
32+
path: ${{ steps.set-archive.outputs.archive }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Setup Windows Toolchain'
2+
description: 'Configure msbuild, MPI, ccache, ninja, and MSVC'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Add msbuild to PATH
7+
uses: microsoft/setup-msbuild@v2
8+
with:
9+
vs-version: 'latest'
10+
- name: Setup MPI
11+
uses: mpi4py/setup-mpi@v1
12+
with:
13+
mpi: msmpi
14+
- name: Setup ccache
15+
uses: Chocobo1/setup-ccache-action@v1
16+
with:
17+
windows_compile_environment: msvc
18+
- name: Setup ninja
19+
uses: seanmiddleditch/gha-setup-ninja@v6
20+
- name: Setup MSVC for Ninja again
21+
uses: ilammy/msvc-dev-cmd@v1

.github/workflows/cmake-lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CMake Lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**/CMakeLists.txt"
7+
- "**/*.cmake"
8+
push:
9+
paths:
10+
- "**/CMakeLists.txt"
11+
- "**/*.cmake"
12+
workflow_dispatch:
13+
14+
jobs:
15+
cmake-lint:
16+
name: Check CMake formatting
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
- name: Install cmake-format
22+
run: python3 -m pip install cmakelang
23+
- name: Run cmake-format
24+
run: |
25+
files=$(git ls-files '**/CMakeLists.txt' 'cmake/*.cmake')
26+
cmake-format --check $files

.github/workflows/lint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,14 @@ jobs:
1919
run: python3 -m pip install flake8
2020
- name: Run flake8
2121
run: python3 -m flake8 .
22+
23+
shell-lint:
24+
runs-on: ubuntu-24.04
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Install shellcheck
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y shellcheck
31+
- name: Run shellcheck
32+
run: shellcheck scripts/*.sh

.github/workflows/mac.yml

Lines changed: 15 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ on:
33

44
jobs:
55
macos-clang-build:
6-
runs-on: macos-latest
6+
runs-on: macOS-latest
77
steps:
88
- uses: actions/checkout@v4
99
with:
1010
submodules: recursive
1111
- name: Install Xcode
1212
uses: maxim-lobanov/setup-xcode@v1
1313
with:
14-
xcode-version: 'latest'
14+
xcode-version: 'latest-stable'
1515
- name: Setup environment
1616
run: |
1717
brew update-reset
@@ -40,13 +40,10 @@ jobs:
4040
run: |
4141
cmake --build build --target install
4242
- name: Archive installed package
43-
run: |
44-
tar -czvf macos-clang-sanitizer-install.tar.gz -C install .
45-
- name: Upload installed package
46-
uses: actions/upload-artifact@v4
43+
uses: ./.github/actions/archive-install
4744
with:
45+
path: install
4846
name: macos-clang-sanitizer-install
49-
path: macos-clang-sanitizer-install.tar.gz
5047
macos-clang-build-debug:
5148
runs-on: macOS-latest
5249
steps:
@@ -56,7 +53,7 @@ jobs:
5653
- name: Install Xcode
5754
uses: maxim-lobanov/setup-xcode@v1
5855
with:
59-
xcode-version: 'latest'
56+
xcode-version: 'latest-stable'
6057
- name: Setup environment
6158
run: |
6259
brew update-reset
@@ -85,13 +82,10 @@ jobs:
8582
run: |
8683
cmake --build build --target install
8784
- name: Archive installed package
88-
run: |
89-
tar -czvf macos-clang-debug-install.tar.gz -C install .
90-
- name: Upload installed package
91-
uses: actions/upload-artifact@v4
85+
uses: ./.github/actions/archive-install
9286
with:
87+
path: install
9388
name: macos-clang-debug-install
94-
path: macos-clang-debug-install.tar.gz
9589
macos-clang-test:
9690
needs:
9791
- macos-clang-build
@@ -101,7 +95,7 @@ jobs:
10195
- name: Install Xcode
10296
uses: maxim-lobanov/setup-xcode@v1
10397
with:
104-
xcode-version: 'latest'
98+
xcode-version: 'latest-stable'
10599
- name: Setup environment
106100
run: |
107101
brew update-reset
@@ -118,46 +112,14 @@ jobs:
118112
run: |
119113
mkdir -p install
120114
tar -xzvf macos-clang-sanitizer-install.tar.gz -C install
121-
- name: Run func tests (MPI, num_proc=1)
122-
run: python3 scripts/run_tests.py --running-type="processes"
123-
env:
124-
PPC_NUM_PROC: 1
125-
PPC_NUM_THREADS: 3
126-
- name: Run func tests (MPI, num_proc=2)
127-
run: python3 scripts/run_tests.py --running-type="processes"
128-
env:
129-
PPC_NUM_PROC: 2
130-
PPC_NUM_THREADS: 2
131-
- name: Run func tests (MPI, num_proc=3)
132-
run: python3 scripts/run_tests.py --running-type="processes"
115+
- name: Run func tests (MPI)
116+
run: python3 scripts/run_tests.py --running-type="processes" --counts 1 2 3 4
133117
env:
134-
PPC_NUM_PROC: 3
135-
PPC_NUM_THREADS: 1
136-
- name: Run func tests (MPI, num_proc=4)
137-
run: python3 scripts/run_tests.py --running-type="processes"
138-
env:
139-
PPC_NUM_PROC: 4
140-
PPC_NUM_THREADS: 1
141-
- name: Run tests (threads, num_threads=1)
142-
run: python3 scripts/run_tests.py --running-type="threads"
143-
env:
144-
PPC_NUM_PROC: 1
145118
PPC_NUM_THREADS: 1
146-
- name: Run tests (threads, num_threads=2)
147-
run: python3 scripts/run_tests.py --running-type="threads"
119+
- name: Run tests (threads)
120+
run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4
148121
env:
149122
PPC_NUM_PROC: 1
150-
PPC_NUM_THREADS: 2
151-
- name: Run tests (threads, num_threads=3)
152-
run: python3 scripts/run_tests.py --running-type="threads"
153-
env:
154-
PPC_NUM_PROC: 1
155-
PPC_NUM_THREADS: 3
156-
- name: Run tests (threads, num_threads=4)
157-
run: python3 scripts/run_tests.py --running-type="threads"
158-
env:
159-
PPC_NUM_PROC: 1
160-
PPC_NUM_THREADS: 4
161123
macos-clang-test-extended:
162124
needs:
163125
- macos-clang-test
@@ -167,7 +129,7 @@ jobs:
167129
- name: Install Xcode
168130
uses: maxim-lobanov/setup-xcode@v1
169131
with:
170-
xcode-version: 'latest'
132+
xcode-version: 'latest-stable'
171133
- name: Setup environment
172134
run: |
173135
brew update-reset
@@ -184,23 +146,7 @@ jobs:
184146
run: |
185147
mkdir -p install
186148
tar -xzvf macos-clang-sanitizer-install.tar.gz -C install
187-
- name: Run tests (threads, num_threads=5)
188-
run: python3 scripts/run_tests.py --running-type="threads"
189-
env:
190-
PPC_NUM_PROC: 1
191-
PPC_NUM_THREADS: 5
192-
- name: Run tests (threads, num_threads=7)
193-
run: python3 scripts/run_tests.py --running-type="threads"
194-
env:
195-
PPC_NUM_PROC: 1
196-
PPC_NUM_THREADS: 7
197-
- name: Run tests (threads, num_threads=11)
198-
run: python3 scripts/run_tests.py --running-type="threads"
199-
env:
200-
PPC_NUM_PROC: 1
201-
PPC_NUM_THREADS: 11
202-
- name: Run tests (threads, num_threads=13)
203-
run: python3 scripts/run_tests.py --running-type="threads"
149+
- name: Run tests (threads extended)
150+
run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
204151
env:
205152
PPC_NUM_PROC: 1
206-
PPC_NUM_THREADS: 13

0 commit comments

Comments
 (0)