50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: odin-ci
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'odin/**'
|
|
- '.github/workflows/odin-ci.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'odin/**'
|
|
- '.github/workflows/odin-ci.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: odin
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup Odin
|
|
uses: laytan/setup-odin@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build
|
|
run: ./build.sh
|
|
|
|
- name: Test
|
|
run: |
|
|
CLAY_DIR="$(pwd)/vendor/clay/bindings/odin/clay-odin"
|
|
BUILD_DIR="$(pwd)/build"
|
|
odin test tests -collection:clay="$CLAY_DIR" -extra-linker-flags:"-L$BUILD_DIR -losdialog"
|
|
|
|
- name: Package
|
|
run: ./scripts/package.sh
|
|
|
|
- name: Upload package artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: comic-odin-package
|
|
path: |
|
|
odin/dist/*.tar.gz
|
|
odin/dist/*.sha256
|