Skip to content

Commit d73fc9c

Browse files
Build pull requests (#757)
* build main of pull-requests * skip dup actions * matrix to specify python version * rename target * downgrade to ubuntu22 for build
1 parent 200dccc commit d73fc9c

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

.github/workflows/frequent_check.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Build, unittest
22

3-
on: [push]
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
48

59

610
jobs:
@@ -9,21 +13,23 @@ jobs:
913
matrix:
1014
os: [windows-latest]
1115
platform: [x64]
16+
python-version: ['3.7']
1217
configuration: [Release]
13-
name: ${{ matrix.os }}-CMake
18+
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
1419
runs-on: ${{ matrix.os }}
15-
1620
steps:
21+
- name: Skip Duplicate Actions
22+
uses: fkirc/skip-duplicate-actions@v5.3.1
1723
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
1824
- name: Set up Python
1925
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
2026
with:
21-
python-version: '3.7'
27+
python-version: ${{ matrix.python-version }}
2228
- name: configure
2329
run: |
2430
mkdir out
2531
cd out
26-
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DPYTHON_VERSION="3.7"
32+
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DPYTHON_VERSION="${{ matrix.python-version }}"
2733
- name: make
2834
run: |
2935
cd out
@@ -52,13 +58,15 @@ jobs:
5258
runs-on: ${{ matrix.os }}
5359

5460
steps:
61+
- name: Skip Duplicate Actions
62+
uses: fkirc/skip-duplicate-actions@v5.3.1
5563
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
5664
- name: configure CODA-OSS
5765
run: |
5866
mkdir externals\coda-oss\out
5967
cd externals\coda-oss\out
6068
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DENABLE_PYTHON=OFF
61-
- name: make CODA-OSS
69+
- name: build CODA-OSS
6270
run: |
6371
cd externals\coda-oss\out
6472
cmake --build . --config ${{ matrix.configuration }} -j
@@ -84,22 +92,24 @@ jobs:
8492
build-linux-cmake:
8593
strategy:
8694
matrix:
87-
os: [ubuntu-latest]
88-
name: ${{ matrix.os }}-CMake
95+
os: [ubuntu-22.04]
96+
python-version: ['3.7']
97+
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
8998
runs-on: ${{ matrix.os }}
90-
9199
steps:
100+
- name: Skip Duplicate Actions
101+
uses: fkirc/skip-duplicate-actions@v5.3.1
92102
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
93103
- name: Set up Python
94104
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
95105
with:
96-
python-version: '3.7'
106+
python-version: ${{ matrix.python-version }}
97107
- name: configure
98108
run: |
99109
mkdir target
100110
cd target
101-
cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=3.7 ..
102-
- name: make
111+
cmake -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=${{ matrix.python-version }} ..
112+
- name: build
103113
run: |
104114
cd target
105115
cmake --build . -j 8

0 commit comments

Comments
 (0)