Skip to content

Build: adding support for distribution via Python package #330

Build: adding support for distribution via Python package

Build: adding support for distribution via Python package #330

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglfw3-dev libgtk-3-dev
- name: Build
run: |
mkdir build
cd build
cmake ..
cmake --build . --parallel 4
- name: Check Product
run: |
cd build
ls -l
file raven
- name: Package Product
run: |
cd build
chmod +x raven
zip -r raven-linux.zip raven
- name: Archive Product
uses: actions/upload-artifact@v4
with:
name: raven-linux.zip
path: build/raven-linux.zip
MacOS:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Build
run: |
mkdir build
cd build
cmake ..
cmake --build . --parallel 4
- name: Check Product
run: |
cd build
ls -l
file raven
- name: Package Product
run: |
cd build
chmod +x raven
zip -r raven-mac.zip raven
- name: Archive Product
uses: actions/upload-artifact@v4
with:
name: raven-mac.zip
path: build/raven-mac.zip
Emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install Dependencies
run: |
wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
tar -xvf master.tar.gz
emsdk-master/emsdk update
emsdk-master/emsdk install latest
emsdk-master/emsdk activate latest
- name: Build
run: |
source emsdk-master/emsdk_env.sh
mkdir build-web
cd build-web
emcmake cmake ..
cmake --build . --parallel 4
- name: Check Product
run: |
ls -l build-web
- name: Package Product
run: |
cd build-web
zip -r raven-web.zip raven.html raven.wasm raven.js raven.worker.js
- name: Archive Product
uses: actions/upload-artifact@v4
with:
name: raven-web.zip
path: build-web/raven-web.zip
Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Build
run: |
mkdir build_win64
cd build_win64
cmake ..
cmake --build . --config Debug --parallel 4
cmake --build . --config Release --parallel 4
- name: Check Product
shell: bash
run: |
cd build_win64
pwd
ls -l
ls -l ./Debug/
ls -l ./Release/
file ./Debug/raven.exe
file ./Release/raven.exe
- name: Archive Product
uses: actions/upload-artifact@v4
with:
name: raven-windows-x64.zip
path: |
build_win64/Release/*
build_win64/Debug/*
package_wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9"]
os: [ ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglfw3-dev libgtk-3-dev
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
- name: Install UV
uses: astral-sh/setup-uv@v6
with:
version: "0.8.22"
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Build Python wheel
run: |
uv build --wheel
- name: Archive Python wheel
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist/*.whl
package_sdist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglfw3-dev libgtk-3-dev
- name: Install UV
uses: astral-sh/setup-uv@v6
with:
version: "0.8.22"
- name: Install Python
run: uv python install
- name: Build Python wheel
run: |
uv build --sdist
- name: Archive Python sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz