Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dvsku committed May 12, 2024
1 parent 9444775 commit 824870c
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 29 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build libnetwrk for Linux

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
architecture: [x86, x64]
build_type: [Release]

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@master
with:
version: 1.10.0

- name: Build
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ runner.workspace }}/build
configure-options: -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
build-type: ${{ matrix.build_type }}

- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest -C ${{ matrix.build-type }}
41 changes: 41 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build libnetwrk for Windows

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: windows-latest

strategy:
matrix:
architecture: [x86, x64]
build_type: [Release]

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up VS toolchain
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.architecture }}

- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@master
with:
version: 1.10.0

- name: Build
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ runner.workspace }}/build
configure-options: -G Ninja -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl
build-type: ${{ matrix.build_type }}

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{ matrix.build-type }}
29 changes: 0 additions & 29 deletions .github/workflows/build.yml

This file was deleted.

0 comments on commit 824870c

Please sign in to comment.