-
Notifications
You must be signed in to change notification settings - Fork 61
70 lines (58 loc) · 2.18 KB
/
ccpp.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: C/C++ CI
on: [push, workflow_dispatch]
concurrency:
group: environment-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: apt
run: sudo apt update && sudo apt install ninja-build liblua5.1-0-dev liblua5.2-dev liblua5.3-dev libluajit-5.1-dev libncursesw5-dev zlib1g-dev libopengl-dev libglfw3-dev libcmark-dev python3-pil libfmt-dev
- name: make
run: |
make -j$(nproc)
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: brew
run: |
brew install pkg-config glfw3 python3 cmark fmt coreutils make
brew link --overwrite python3
python3 -m pip install --upgrade Pillow
- name: make
run: |
gmake -j$(nproc) BUILDTYPE=osx
build-windows:
runs-on: windows-latest
steps:
- name: setup WSL
run: |
curl -L https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/releases/download/39.0.1/Fedora-Remix-for-WSL-SL_39.0.1.0_x64_arm64.msixbundle -o fedora.msixbundle
unzip fedora.msixbundle Fedora-Remix-for-WSL-SL_39.0.1.0_x64.msix
unzip Fedora-Remix-for-WSL-SL_39.0.1.0_x64.msix install.tar.gz
wsl --update
wsl --import fedora fedora install.tar.gz
wsl --set-default fedora
wsl sh -c 'dnf -y install https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-38-1.noarch.rpm'
wsl sh -c 'dnf -y install --setop=install_weak_deps=False gcc gcc-c++ mingw32-gcc mingw32-gcc-c++ mingw32-zlib-static mingw32-nsis python3-pillow'
- name: fix line endings
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
with:
path: 'wordgrinder'
- name: run
run: |
wsl sh -c 'make -C wordgrinder BUILDTYPE=windows -j$(nproc)'
- name: zip
run: |
wsl sh -c 'zip -9 wordgrinder-windows.zip wordgrinder/bin/*.exe'
- name: upload
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}.${{ github.sha }}
path: wordgrinder-windows.zip