ci: build workflow
This commit is contained in:
45
.github/workflows/build.yml
vendored
Normal file
45
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches: [fork]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . --config Debug
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pycdc-fork-${{ matrix.os }}
|
||||
path: build/pycdc
|
||||
|
||||
windows-build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "MinGW Makefiles" ..
|
||||
cmake --build . --config Debug
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pycdc-fork-windows
|
||||
path: build/pycdc.exe
|
||||
29
.github/workflows/linux-ci.yml
vendored
29
.github/workflows/linux-ci.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Linux-CI
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Configure and Build
|
||||
run: |
|
||||
(
|
||||
mkdir build-debug && cd build-debug
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||
make -j4
|
||||
)
|
||||
|
||||
(
|
||||
mkdir build-release && cd build-release
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||
make -j4
|
||||
)
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cmake --build build-debug --target check
|
||||
cmake --build build-release --target check
|
||||
29
.github/workflows/msvc-ci.yml
vendored
29
.github/workflows/msvc-ci.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: MSVC-CI
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure and Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Visual Studio 17 2022" -A Win32 ..
|
||||
cmake --build . --config Debug
|
||||
cmake --build . --config Release
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cmake --build build --config Debug --target check
|
||||
cmake --build build --config Release --target check
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pycdc-release
|
||||
path: build\Release\*.exe
|
||||
Reference in New Issue
Block a user