Skip to content

Commit a7364d2

Browse files
committed
Add a github workflow
1 parent 55f9489 commit a7364d2

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

.github/workflows/build.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CC: clang
11+
12+
jobs:
13+
ubuntu:
14+
strategy:
15+
matrix:
16+
os: [ ubuntu-latest, ubuntu-22.04 ]
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Install Lua
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get -y install liblua5.4-dev
26+
27+
- name: Configure
28+
run: ./configure
29+
30+
- name: Build
31+
run: make
32+
33+
openbsd:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Bootstrap OpenBSD-latest
37+
uses: mario-campos/emulate@v1
38+
with:
39+
operating-system: openbsd-latest
40+
41+
- name: Install Dependencies
42+
run: pkg_add git
43+
44+
- name: Build
45+
run: |
46+
git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build
47+
cd build
48+
[ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}")
49+
./configure
50+
make
51+
52+
freebsd:
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Bootstrap FreeBSD-latest
56+
uses: mario-campos/emulate@v1
57+
with:
58+
operating-system: freebsd-latest
59+
60+
- name: Install Dependencies
61+
run: pkg install -y git
62+
63+
- name: Build
64+
run: |
65+
git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build
66+
cd build
67+
[ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}")
68+
./configure
69+
make
70+
71+
netbsd:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Bootstrap NetBSD-latest
75+
uses: mario-campos/emulate@v1
76+
with:
77+
operating-system: netbsd-latest
78+
79+
- name: Build
80+
run: |
81+
git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build
82+
cd build
83+
[ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}")
84+
CFLAGS=-Werror CPPFLAGS="${{ matrix.cppflags }}" ./configure ${{ matrix.args }}
85+
make

0 commit comments

Comments
 (0)