Skip to content

release builds

release builds #43

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-linux-windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev mingw-w64
- name: Build for Linux
run: |
gcc -o Chip8Interpreter src/*.c -lSDL2 -lm
- name: Setup SDL2 for Windows
run: |
wget https://www.libsdl.org/release/SDL2-devel-2.0.14-VC.zip
unzip SDL2-devel-2.0.14-VC.zip
- name: Move SDL2 headers into SDL2 directory
run: |
mkdir SDL2-2.0.14/include/SDL2
mv SDL2-2.0.14/include/*.h SDL2-2.0.14/include/SDL2
- name: Build for Windows
run: |
x86_64-w64-mingw32-gcc -o Chip8Interpreter.exe src/*.c -I SDL2-2.0.14/include -L SDL2-2.0.14/lib/x64 -lmingw32 -lSDL2main -lSDL2 -lm
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Chip8Interpreter-Linux
path: ./Chip8Interpreter
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Chip8Interpreter-Windows
path: ./Chip8Interpreter.exe
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install sdl2
- name: Build for macOS
run: |
gcc -o Chip8Interpreter src/*.c -lSDL2 -lm
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Chip8Interpreter-macOS
path: ./Chip8Interpreter