Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
Firaenix committed Nov 18, 2024
1 parent f567315 commit 34939a3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,28 @@ jobs:
- target: i686-unknown-linux-gnu
os: ubuntu-latest
artifact_name: bping
gcc_package: gcc-multilib

# Tier 2 Platforms
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
artifact_name: bping
gcc_package: gcc-aarch64-linux-gnu
- target: aarch64-apple-darwin
os: macos-latest
artifact_name: bping
- target: arm-unknown-linux-gnueabi
os: ubuntu-latest
artifact_name: bping
gcc_package: gcc-arm-linux-gnueabi
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
artifact_name: bping
gcc_package: gcc-arm-linux-gnueabihf
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
artifact_name: bping
gcc_package: musl-tools

steps:
- uses: actions/checkout@v4
Expand All @@ -60,6 +65,9 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y curl build-essential pkg-config libssl-dev
if [ ! -z "${{ matrix.gcc_package }}" ]; then
sudo apt-get install -y ${{ matrix.gcc_package }}
fi
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -98,7 +106,6 @@ jobs:
- name: Show sccache stats
run: sccache --show-stats

# Optional: Upload artifacts if needed
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/rust-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,28 @@ jobs:
- target: i686-unknown-linux-gnu
os: ubuntu-latest
asset_name: bping-i686-linux-gnu
gcc_package: gcc-multilib

# Tier 2 Platforms
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
asset_name: bping-aarch64-linux-gnu
gcc_package: gcc-aarch64-linux-gnu
- target: aarch64-apple-darwin
os: macos-latest
asset_name: bping-aarch64-darwin
- target: arm-unknown-linux-gnueabi
os: ubuntu-latest
asset_name: bping-arm-linux-gnueabi
gcc_package: gcc-arm-linux-gnueabi
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
asset_name: bping-armv7-linux-gnueabihf
gcc_package: gcc-arm-linux-gnueabihf
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
asset_name: bping-x86_64-linux-musl
gcc_package: musl-tools

steps:
- uses: actions/checkout@v4
Expand All @@ -60,6 +65,9 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y curl build-essential pkg-config libssl-dev
if [ ! -z "${{ matrix.gcc_package }}" ]; then
sudo apt-get install -y ${{ matrix.gcc_package }}
fi
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -100,7 +108,14 @@ jobs:

- name: Strip binary
if: runner.os != 'Windows'
run: strip target/${{ matrix.target }}/release/bping
run: |
if [ "${{ matrix.target }}" != "aarch64-apple-darwin" ]; then
if [ -n "${{ matrix.gcc_package }}" ]; then
${{ matrix.target }}-strip target/${{ matrix.target }}/release/bping
else
strip target/${{ matrix.target }}/release/bping
fi
fi
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
Expand All @@ -110,7 +125,6 @@ jobs:
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}

# Optional: Upload artifacts for debugging or additional processing
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 34939a3

Please sign in to comment.