build: filter CI by paths and branches (#3569)
Avoids some unnecessary CI work, particularly on forks, which would often start a build on every push.
This commit is contained in:
parent
93309c6dbf
commit
8528c622b0
@ -1,44 +1,19 @@
|
|||||||
name: CI
|
name: CI-unix
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**'
|
||||||
|
- '!docs/**'
|
||||||
|
- '!src/win/**'
|
||||||
|
- '!.**'
|
||||||
|
- '.github/workflows/CI-unix.yml'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v[0-9].*
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
|
||||||
runs-on: windows-${{ matrix.config.server }}
|
|
||||||
name: build-${{ matrix.config.toolchain}}-${{ matrix.config.arch}}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
config:
|
|
||||||
- {toolchain: Visual Studio 16 2019, arch: Win32, server: 2019}
|
|
||||||
- {toolchain: Visual Studio 16 2019, arch: x64, server: 2019}
|
|
||||||
- {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022}
|
|
||||||
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Envinfo
|
|
||||||
run: npx envinfo
|
|
||||||
- name: Build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir -p build
|
|
||||||
cd build
|
|
||||||
cmake .. -DBUILD_TESTING=ON -G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }}
|
|
||||||
cmake --build .
|
|
||||||
- name: platform_output
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
build\\Debug\\uv_run_tests.exe platform_output
|
|
||||||
- name: platform_output_a
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
build\\Debug\\uv_run_tests_a.exe platform_output
|
|
||||||
- name: Test
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
ctest -C Debug -V
|
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: reactnativecommunity/react-native-android:2020-5-20
|
container: reactnativecommunity/react-native-android:2020-5-20
|
||||||
51
.github/workflows/CI-win.yml
vendored
Normal file
51
.github/workflows/CI-win.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
name: CI-win
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**'
|
||||||
|
- '!docs/**'
|
||||||
|
- '!src/win/**'
|
||||||
|
- '!.**'
|
||||||
|
- '.github/workflows/CI-win.yml'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v[0-9].*
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-${{ matrix.config.server }}
|
||||||
|
name: build-${{ matrix.config.toolchain}}-${{ matrix.config.arch}}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {toolchain: Visual Studio 16 2019, arch: Win32, server: 2019}
|
||||||
|
- {toolchain: Visual Studio 16 2019, arch: x64, server: 2019}
|
||||||
|
- {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022}
|
||||||
|
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Envinfo
|
||||||
|
run: npx envinfo
|
||||||
|
- name: Build
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake .. -DBUILD_TESTING=ON -G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }}
|
||||||
|
cmake --build .
|
||||||
|
- name: platform_output
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
build\\Debug\\uv_run_tests.exe platform_output
|
||||||
|
- name: platform_output_a
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
build\\Debug\\uv_run_tests_a.exe platform_output
|
||||||
|
- name: Test
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest -C Debug -V
|
||||||
23
.github/workflows/sanitizer.yml
vendored
23
.github/workflows/sanitizer.yml
vendored
@ -1,6 +1,16 @@
|
|||||||
name: Sanitizer checks
|
name: Sanitizer checks
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**'
|
||||||
|
- '!docs/**'
|
||||||
|
- '!.**'
|
||||||
|
- '.github/workflows/sanitizer.yml'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v[0-9].*
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sanitizers:
|
sanitizers:
|
||||||
@ -12,15 +22,20 @@ jobs:
|
|||||||
sudo apt-get install ninja-build
|
sudo apt-get install ninja-build
|
||||||
- name: Envinfo
|
- name: Envinfo
|
||||||
run: npx envinfo
|
run: npx envinfo
|
||||||
- name: TSAN
|
- name: TSAN Build
|
||||||
run: |
|
run: |
|
||||||
mkdir build-tsan
|
mkdir build-tsan
|
||||||
(cd build-tsan && cmake .. -G Ninja -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release)
|
(cd build-tsan && cmake .. -G Ninja -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release)
|
||||||
cmake --build build-tsan
|
cmake --build build-tsan
|
||||||
./build-tsan/uv_run_tests_a || true # currently permit failures
|
- name: TSAN Test
|
||||||
- name: ASAN
|
continue-on-error: true # currently permit failures
|
||||||
|
run: |
|
||||||
|
./build-tsan/uv_run_tests_a
|
||||||
|
- name: ASAN Build
|
||||||
run: |
|
run: |
|
||||||
mkdir build-asan
|
mkdir build-asan
|
||||||
(cd build-asan && cmake .. -G Ninja -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug)
|
(cd build-asan && cmake .. -G Ninja -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug)
|
||||||
cmake --build build-asan
|
cmake --build build-asan
|
||||||
|
- name: ASAN Test
|
||||||
|
run: |
|
||||||
./build-asan/uv_run_tests_a
|
./build-asan/uv_run_tests_a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user