Skip to content

Commit

Permalink
Add workflow to build statically linked binary
Browse files Browse the repository at this point in the history
Sometimes no suitable build environment is at hand but a binary of the
program desired. For such cases it makes sense to have access to a
statically linked binary that essentially is able to run on any Linux.
This change introduces a workflow that can be used to produce such a
binary. It can be triggered on-demand and will produce such a binary and
make it available as a downloadable artifact.
  • Loading branch information
d-e-s-o committed Feb 25, 2023
1 parent a8fba02 commit 1975a79
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) 2023 Daniel Mueller <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later

name: Build

on:
workflow_dispatch:

jobs:
build:
name: Build statically linked binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install musl-tools
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: x86_64-unknown-linux-musl
- run: |
cargo install --bin=apcacli --features=vendored-openssl --path=. --root=. --target x86_64-unknown-linux-musl
strip bin/apcacli
- uses: actions/upload-artifact@v3
with:
name: apcacli
path: bin/apcacli

0 comments on commit 1975a79

Please sign in to comment.