mirror of
https://github.com/obhq/obliteration.git
synced 2024-10-07 00:13:24 +00:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: PR Build
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
concurrency: pr-${{ github.ref }}
|
|
jobs:
|
|
prebuild:
|
|
name: Pre build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
- name: Check Rust styles
|
|
run: cargo fmt --check
|
|
working-directory: src
|
|
build-windows:
|
|
name: Build
|
|
uses: ./.github/workflows/ci-windows.yml
|
|
needs: prebuild
|
|
build-linux:
|
|
name: Build
|
|
uses: ./.github/workflows/ci-linux.yml
|
|
needs: prebuild
|
|
build-mac:
|
|
name: Build
|
|
uses: ./.github/workflows/ci-mac.yml
|
|
needs: prebuild
|
|
postbuild:
|
|
name: Post build
|
|
runs-on: ubuntu-latest
|
|
needs: [build-windows, build-linux, build-mac]
|
|
steps:
|
|
- name: Generate build information
|
|
run: |
|
|
import json
|
|
|
|
info = {
|
|
"pr": ${{ github.event.number }},
|
|
"base": "${{ github.base_ref }}",
|
|
"head": "${{ github.event.pull_request.head.sha }}",
|
|
"author": "${{ github.event.pull_request.head.user.login }}"
|
|
}
|
|
|
|
with open("build-info.json", "w") as fp:
|
|
json.dump(info, fp)
|
|
shell: python
|
|
- name: Upload build information
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-info
|
|
path: build-info.json
|