fix(release): Fix FreeBSD build and add manual workflow trigger (#1399)
This commit is contained in:
29
.github/workflows/create_release_assets.yml
vendored
29
.github/workflows/create_release_assets.yml
vendored
@@ -3,6 +3,20 @@ name: Publish release files for CD native and non-cd-native environments
|
|||||||
on:
|
on:
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [ release-created ]
|
types: [ release-created ]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
description: "Run only this native platform (leave empty for all)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
target:
|
||||||
|
description: "Run only this cross target (leave empty for all)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
run_trigger:
|
||||||
|
description: "Run the trigger job after builds?"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -25,6 +39,10 @@ jobs:
|
|||||||
# https://github.com/topgrade-rs/topgrade/issues/1095
|
# https://github.com/topgrade-rs/topgrade/issues/1095
|
||||||
platform: [ ubuntu-22.04, macos-latest, macos-15-intel, windows-latest ]
|
platform: [ ubuntu-22.04, macos-latest, macos-15-intel, windows-latest ]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
if: >
|
||||||
|
github.event_name == 'repository_dispatch' ||
|
||||||
|
github.event.inputs.platform == '' ||
|
||||||
|
github.event.inputs.platform == matrix.platform
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5.0.0
|
- uses: actions/checkout@v5.0.0
|
||||||
|
|
||||||
@@ -152,6 +170,10 @@ jobs:
|
|||||||
"x86_64-unknown-freebsd",
|
"x86_64-unknown-freebsd",
|
||||||
]
|
]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: >
|
||||||
|
github.event_name == 'repository_dispatch' ||
|
||||||
|
github.event.inputs.target == '' ||
|
||||||
|
github.event.inputs.target == matrix.target
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5.0.0
|
- uses: actions/checkout@v5.0.0
|
||||||
|
|
||||||
@@ -179,9 +201,8 @@ jobs:
|
|||||||
run: rustup target add ${{ matrix.target }}
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
- name: install cross
|
- name: install cross
|
||||||
uses: taiki-e/install-action@c5b1b6f479c32f356cc6f4ba672a47f63853b13b # v2.62.38
|
# Install from source to fix `ld: cannot find -lgeom` for freebsd build
|
||||||
with:
|
run: cargo install --git https://github.com/cross-rs/cross cross
|
||||||
tool: cross@0.2.5
|
|
||||||
|
|
||||||
- name: Check format
|
- name: Check format
|
||||||
run: cross fmt --all -- --check
|
run: cross fmt --all -- --check
|
||||||
@@ -201,6 +222,7 @@ jobs:
|
|||||||
# could not execute process `/target/x86_64-unknown-freebsd/debug/deps/topgrade-9b1670d87ca863dd` (never executed)
|
# could not execute process `/target/x86_64-unknown-freebsd/debug/deps/topgrade-9b1670d87ca863dd` (never executed)
|
||||||
# Caused by:
|
# Caused by:
|
||||||
# No such file or directory (os error 2)
|
# No such file or directory (os error 2)
|
||||||
|
# TODO: I have not tested this in GHA yet, only locally
|
||||||
if: ${{ matrix.target != 'x86_64-unknown-freebsd' }}
|
if: ${{ matrix.target != 'x86_64-unknown-freebsd' }}
|
||||||
|
|
||||||
# Used `https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml`
|
# Used `https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml`
|
||||||
@@ -275,6 +297,7 @@ jobs:
|
|||||||
triggers:
|
triggers:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ native_build, cross_build ]
|
needs: [ native_build, cross_build ]
|
||||||
|
if: ${{ github.event_name == 'repository_dispatch' && github.event.inputs.run_trigger == 'true' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger workflows
|
- name: Trigger workflows
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user