Statically compile and strip the executable #5
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: innoextract CI | |
on: | |
push: | |
# Runs on every pushed commit | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Forced to run on debian:buster since debian:bullseye's Boost is not | |
# functional to compile executables statically WITH bz2 and lzma. | |
container: debian:buster | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake libboost-all-dev liblzma-dev | |
# Only because we are running on debian:buster | |
sudo apt-get install -y zlib1g-dev libbz2-dev | |
- name: Build innoextract | |
run: | | |
mkdir -p build | |
cd build | |
cmake -DUSE_STATIC_LIBS=ON .. | |
make | |
strip innoextract | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: innoextract | |
path: build/innoextract | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: build/innoextract |