accelerator/.github/workflows/ci.yml
Benoist 0efbfbeccb
Some checks failed
Release / main-ci (push) Has been cancelled
Release / release (push) Has been cancelled
Add release workflow (#40)
* Add release workflow

* Restrict to direct push

* Update dependent CI

* Correct main CI

* Optimize workflow dispatch

* Restrict to 'workflow_call'

* Don't rely on 'workflow_call'

* Actually use UPLOAD_PASSWORD

* add the -git tag

* use short sha

* fix platform naming mistake

* Add branch param to upload url

* Setup PR workflow

* modify the trigger

* Add branch name debug + renable PR workflow

* Try %22

* No quotes!
2025-09-30 11:19:00 -04:00

46 lines
1.3 KiB
YAML

name: CI
on:
workflow_dispatch:
workflow_call:
inputs:
release:
type: boolean
required: true
default: false
jobs:
cache:
uses: ./.github/workflows/cache.yml
build-options:
runs-on: ubuntu-latest
outputs:
exclude: ${{ steps.set.outputs.exclude }}
steps:
- id: set
run: |
echo "exclude=[${{ inputs.release && '{"runners": { "upload": false } }' || '' }}]" >> $GITHUB_OUTPUT
build:
name: Build
needs: [ cache, build-options ]
strategy:
fail-fast: false
matrix:
runners: [
{ os: ubuntu-22.04, cc: clang, cxx: clang++, upload: true, upload-artifact-name: accelerator_linux },
{ os: ubuntu-latest, cc: clang, cxx: clang++, upload: false },
{ os: windows-latest, cc: msvc, cxx: msvc, upload: true, upload-artifact-name: accelerator_windows }
]
exclude: ${{ fromJson(needs.build-options.outputs.exclude) }}
uses: ./.github/workflows/build-extension.yml
with:
os: ${{ matrix.runners.os }}
cc: ${{ matrix.runners.cc }}
cxx: ${{ matrix.runners.cxx }}
upload: ${{ matrix.runners.upload }}
upload-artifact-name: ${{ matrix.runners.upload-artifact-name }}
cache-key: ${{ needs.cache.outputs.key }}
cache-dir: ${{ needs.cache.outputs.dir }}