-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (26 loc) · 837 Bytes
/
main.yml
File metadata and controls
34 lines (26 loc) · 837 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
name: build-cpp
on:
workflow_dispatch:
jobs:
compile:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# - name: Install compiler (Linux)
# if: matrix.os == 'ubuntu-latest'
#run: sudo apt-get update && sudo apt-get install -y g++
- name: Compile
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
g++ cppsp_compiler.cpp -Os -s -std=c++17 -o cppsp_compiler_linux.delete_linux -static
else
clang++ cppsp_compiler.cpp -Os -std=c++17 -o cppsp_compiler_mac.delete_mac
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-binary
path: cppsp_compiler_*