Skip to content

Commit 1d9c099

Browse files
committed
Add GitHub Actions build workflow
1 parent 2f2aff9 commit 1d9c099

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.github/workflows/build.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
windows:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Setup
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y gcc-mingw-w64 make zip
17+
- name: Build x86_64
18+
run: |
19+
CC=x86_64-w64-mingw32-gcc make
20+
zip -r bin2video-win32-x86_64.zip bin2video.exe
21+
rm bin2video.exe
22+
- name: Archive x86_64
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: bin2video-win32-x86_64
26+
path: bin2video-win32-x86_64.zip
27+
- name: Build i686
28+
run: |
29+
CC=i686-w64-mingw32-gcc make
30+
zip -r bin2video-win32-i686.zip bin2video.exe
31+
rm bin2video.exe
32+
- name: Archive i686
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: bin2video-win32-i686
36+
path: bin2video-win32-i686.zip
37+
linux:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Setup
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install gcc tar
45+
- name: Build
46+
run: |
47+
make
48+
tar -czvf bin2video-linux-x86_64.tar.gz bin2video
49+
- name: Archive
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: bin2video-linux-x86_64
53+
path: bin2video-linux-x86_64.tar.gz

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
*
2+
!.github/
3+
!.github/workflows/
4+
!.github/workflows/build.yaml
25
!src/
36
!src/*.c
47
!src/*.h

0 commit comments

Comments
 (0)