ci: Add building CUI

This commit is contained in:
Calcitem 2021-11-14 12:12:31 +08:00
parent 58a0a4ba9f
commit c0b308a2ce
3 changed files with 93 additions and 0 deletions

30
.github/workflows/cui-on-macos.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: CUI on macOS
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Export environment valuables
run: export
- name: Print clang version
run: g++ -v
# Build
- name: Build CUI
run: cd src; make -j build ARCH=x86-64
# Archive apk
- name: Archive CUI
uses: actions/upload-artifact@v2
with:
name: sanmill-for-macos
path: src/sanmill

33
.github/workflows/cui-on-ubuntu.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: CUI on Ubuntu
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Export environment valuables
run: export
- name: Print g++ version
run: g++ -v
- name: Create App version
run: git fetch --tags; git tag; git log -n1; bash -x ./version.sh
# Build
- name: Build CUI
run: cd src; make -j build ARCH=x86-64
# Archive apk
- name: Archive CUI
uses: actions/upload-artifact@v2
with:
name: sanmill-for-linux
path: src/sanmill

30
.github/workflows/cui-on-windows.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: CUI on Windows
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64
packages: make gcc-g++
# Build
- name: Build CUI
run: cd src; make -j build ARCH=x86-64
# Archive apk
- name: Archive CUI
uses: actions/upload-artifact@v2
with:
name: sanmill-for-cygwin
path: src/sanmill.exe