Skip to content

Commit

Permalink
migrating from actions-rs to dtolnay stuff; matrix build; test 5
Browse files Browse the repository at this point in the history
  • Loading branch information
epi052 committed Sep 15, 2024
1 parent 24617a6 commit 4b613b7
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
jobs:
release:
name: Release - ${{ matrix.platform.os_name }}
# if: startsWith( github.ref, 'refs/tags/v' ) || github.ref == 'refs/tags/test-release'
strategy:
matrix:
platform:
- os_name: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
bin: ubi
name: ubi-Linux-x86_64-musl.tar.gz
cross: false
cargo_command: cargo
47 changes: 30 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: CD Pipeline
on: [push]

jobs:
build-nix:
build-nix-release:
name: Release - ${{ matrix.os }}
env:
IN_PIPELINE: true
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -38,25 +39,37 @@ jobs:
pkg_config_path: /usr/lib/x86_64-linux-gnu/pkgconfig
steps:
- uses: actions/checkout@v4
- name: Install System Dependencies
run: |
env
sudo apt-get update
sudo apt-get install -y --no-install-recommends libssl-dev pkg-config gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu musl-tools
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@master
env:
PKG_CONFIG_PATH: ${{ matrix.pkg_config_path }}
OPENSSL_DIR: /usr/lib/ssl
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
target: ${{ matrix.target }}
args: "--locked --release"
strip: true
toolchain: stable
run: \
cargo install cross --git https://github.com/cross-rs/cross
cross build --target ${{ matrix.target }} --release

- name: Strip symbols from binary
run: |
strip -s ${{ matrix.path }} || arm-linux-gnueabihf-strip -s ${{ matrix.path }} || aarch64-linux-gnu-strip -s ${{ matrix.path }}
# - uses: actions/checkout@v4
# - name: Install System Dependencies
# run: |
# env
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends libssl-dev pkg-config gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu musl-tools
# - name: Set up Rust toolchain
# uses: dtolnay/rust-toolchain@master
# env:
# PKG_CONFIG_PATH: ${{ matrix.pkg_config_path }}
# OPENSSL_DIR: /usr/lib/ssl
# with:
# toolchain: stable
# run: \
# cargo install cross --git https://github.com/cross-rs/cross
# cross build --target ${{ matrix.target }} --release

# - name: Strip symbols from binary
# run: |
# strip -s ${{ matrix.path }} || arm-linux-gnueabihf-strip -s ${{ matrix.path }} || aarch64-linux-gnu-strip -s ${{ matrix.path }}
- name: Build tar.gz for homebrew installs
if: matrix.type == 'ubuntu-x64'
run: |
Expand Down

0 comments on commit 4b613b7

Please sign in to comment.