chore(deps): bump eframe from 0.28.1 to 0.29.1 in /rustbee-gui #98
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release for Windows and Linux | ||
# TODO: Add MacOS | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.token }} | ||
jobs: | ||
release_cli: | ||
if: github.event.pull_request.head.ref !~ 'dependabot/.*' | ||
Check failure on line 18 in .github/workflows/build_and_release.yml GitHub Actions / Build and Release for Windows and LinuxInvalid workflow file
|
||
strategy: | ||
matrix: | ||
platform: | ||
- target: x86_64-unknown-linux-gnu | ||
cli_bin: rustbee | ||
gui_bin: rustbee-gui | ||
daemon_bin: rustbee-daemon | ||
os_name: Linux-x86_64 | ||
os: ubuntu-latest | ||
- target: x86_64-pc-windows-gnu | ||
cli_bin: rustbee.exe | ||
# houseabsolute/actions-rust-release@v0 perl script automatically adds .exe | ||
cli_bin_no_ext: rustbee | ||
gui_bin: rustbee-gui.exe | ||
gui_bin_no_ext: rustbee-gui | ||
daemon_bin: rustbee-daemon.exe | ||
os_name: Windows-x86_64 | ||
os: windows-latest | ||
# TODO: Respect Mac users, maybe ? | ||
# - target: x86_64-apple-darwin | ||
# bin: rustbee | ||
# os_name: MacOS-x86_64 | ||
# os: macOS-latest | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.platform.target }} | ||
override: true | ||
- name: Cache cargo & target directories | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install dependencies | ||
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt install libdbus-1-dev pkg-config | ||
- name: Build CLI | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
working-directory: . | ||
command: build | ||
target: ${{ matrix.platform.target }} | ||
args: "--locked --release" | ||
- name: Build Daemon | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
working-directory: ./rustbee-daemon | ||
command: build | ||
target: ${{ matrix.platform.target }} | ||
args: "--locked --release" | ||
# Note that it releases when is a tag and prefix is "v" or custom with "release-tag-prefix" | ||
# https://github.com/houseabsolute/actions-rust-release/blob/v0/action.yml#L122 | ||
# TODO: Change author to houseabsolute if/when PR https://github.com/houseabsolute/actions-rust-release/pull/2 | ||
# is merged. Don't forget below one too | ||
- name: Publish artifacts and release | ||
uses: houseabsolute/actions-rust-release@v3 | ||
with: | ||
working-directory: . | ||
executable-name: ${{ matrix.platform.cli_bin_no_ext || matrix.platform.cli_bin }} | ||
changes-file: CHANGELOG.md | ||
target: ${{ matrix.platform.target }} | ||
extra-files: | | ||
rustbee-daemon/target/${{ matrix.platform.target }}/release/${{ matrix.platform.daemon_bin }} | ||
README.md | ||
Justfile | ||
release_gui: | ||
if: github.event.pull_request.head.ref !~ 'dependabot/.*' | ||
# Copy of the above strategy | ||
strategy: | ||
matrix: | ||
platform: | ||
- target: x86_64-unknown-linux-gnu | ||
cli_bin: rustbee | ||
gui_bin: rustbee-gui | ||
daemon_bin: rustbee-daemon | ||
os_name: Linux-x86_64 | ||
os: ubuntu-latest | ||
- target: x86_64-pc-windows-gnu | ||
cli_bin: rustbee.exe | ||
cli_bin_no_ext: rustbee | ||
gui_bin: rustbee-gui.exe | ||
gui_bin_no_ext: rustbee-gui | ||
daemon_bin: rustbee-daemon.exe | ||
os_name: Windows-x86_64 | ||
os: windows-latest | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.platform.target }} | ||
override: true | ||
- name: Cache cargo & target directories | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install dependencies | ||
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt install libdbus-1-dev pkg-config | ||
- name: Build GUI | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
working-directory: ./rustbee-gui | ||
command: build | ||
target: ${{ matrix.platform.target }} | ||
args: "--locked --release" | ||
- name: Build Daemon | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
working-directory: ./rustbee-daemon | ||
command: build | ||
target: ${{ matrix.platform.target }} | ||
args: "--locked --release" | ||
- name: Publish artifacts and release | ||
uses: houseabsolute/actions-rust-release@v3 | ||
with: | ||
working-directory: ./rustbee-gui | ||
executable-name: ${{ matrix.platform.gui_bin_no_ext || matrix.platform.gui_bin }} | ||
changes-file: ../CHANGELOG.md | ||
target: ${{ matrix.platform.target }} | ||
extra-files: | | ||
../rustbee-daemon/target/${{ matrix.platform.target }}/release/${{ matrix.platform.daemon_bin }} | ||
../README.md | ||
../Justfile | ||
release_c_lib: | ||
if: github.event.pull_request.head.ref !~ 'dependabot/.*' | ||
# Copy of the above strategy | ||
strategy: | ||
matrix: | ||
platform: | ||
- target: x86_64-unknown-linux-gnu | ||
os_name: Linux-x86_64 | ||
os: ubuntu-latest | ||
- target: x86_64-pc-windows-gnu | ||
os_name: Windows-x86_64 | ||
os: windows-latest | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.platform.target }} | ||
override: true | ||
- name: Cache cargo & target directories | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install dependencies | ||
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt install libdbus-1-dev pkg-config | ||
- name: Build C dynamic library | ||
run: | | ||
cd rustbee-common | ||
rustup target add ${{ matrix.platform.target }} | ||
cargo rustc --release --features ffi --crate-type=cdylib --target ${{ matrix.platform.target }} | ||
mkdir artifacts | ||
cp librustbee.h artifacts | ||
cp target/${{ matrix.platform.target }}/release/*rustbee* artifacts | ||
- name: Remove the _common extensions for consistency | ||
continue-on-error: true | ||
run: | | ||
set +e | ||
cd rustbee-common/artifacts | ||
mv rustbee_common.dll rustbee.dll | ||
mv rustbee_common.d rustbee.d | ||
mv librustbee_common.dll.a librustbee.dll.a | ||
mv librustbee_common.so librustbee.so | ||
mv librustbee_common.d librustbee.d | ||
- name: Publish artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: librustbee-${{ matrix.platform.os_name }}-gnu | ||
path: rustbee-common/artifacts | ||
- name: Publish GitHub release | ||
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v') | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: rustbee-common/artifacts | ||
body_path: CHANGELOG.md |