Skip to content

Commit

Permalink
Add CI for build
Browse files Browse the repository at this point in the history
  • Loading branch information
zchrissirhcz committed Nov 24, 2024
1 parent 092a561 commit 9975d67
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CMake Build
name: RocBuild build

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
ninjaVersion: "^1.12.1"

- name: Build
run: python test.py
run: cmake -P rocsetup.cmake -p linux -a x64 -S . -B build -G Ninja && cmake --build build

build_windows:
runs-on: windows-latest
Expand All @@ -42,7 +42,7 @@ jobs:
arch: x64

- name: Build
run: python test.py
run: cmake -P rocsetup.cmake -p vs2022 -a x64 -S . -B build -G Ninja && cmake --build build

build_macos:
runs-on: macos-latest
Expand All @@ -57,4 +57,4 @@ jobs:
ninjaVersion: "^1.12.1"

- name: Build
run: python test.py
run: cmake -P rocsetup.cmake -p macos -a x64 -S . -B build -G Ninja && cmake --build build
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: RocBuild test

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.31.0"
ninjaVersion: "^1.12.1"

- name: Test
run: python test.py

build_windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.31.0"
ninjaVersion: "^1.12.1"

- name: "Enter Visual Studio Developer Command Prompt"
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64

- name: Test
run: python test.py

build_macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.31.0"
ninjaVersion: "^1.12.1"

- name: Test
run: python test.py
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RocBuild

![Build Status](https://github.com/zchrissirhcz/rocbuild/actions/workflows/build.yml/badge.svg)
![Test Status](https://github.com/zchrissirhcz/rocbuild/actions/workflows/test.yml/badge.svg)

## rocsetup.cmake

Expand Down

0 comments on commit 9975d67

Please sign in to comment.