Skip to content

release builds

release builds #31

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
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: Build for Windows
run: |
x86_64-w64-mingw32-gcc -o Chip8Interpreter.exe src/*.c -lmingw32 -lSDL2main -lSDL2 -lm
- name: Setup osxcross
run: |
sudo apt-get install -y clang cmake git lzma-dev libxml2-dev libssl-dev zlib1g-dev
git clone https://github.com/tpoechtrager/osxcross
cd osxcross
wget -P tarballs https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.11.sdk.tar.xz
UNATTENDED=yes OSX_VERSION_MIN=10.6 ./build.sh
- name: Build for macOS
run: |
PATH=$PATH:$(pwd)/osxcross/target/bin
o64-clang -o Chip8Interpreter src/*.c -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
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Chip8Interpreter-macOS
path: ./Chip8Interpreter