-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 895 Bytes
/
c-cpp.yml
File metadata and controls
39 lines (32 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build and Test C++ Code on Windows
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest # Pastikan menjalankan di Windows
steps:
- uses: actions/checkout@v2
# Install CMake menggunakan Chocolatey
- name: Install CMake
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
refreshenv
# Install Visual Studio Build Tools (jika belum ada)
- name: Install Visual Studio Build Tools
run: |
choco install visualstudio2019-workload-vctools -y
refreshenv
# Build proyek menggunakan CMake
- name: Build with CMake
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release
# Menjalankan tes jika diperlukan
- name: Run tests
run: |
ctest --output-on-failure