Skip to content

Commit

Permalink
Statically compile and strip the executable
Browse files Browse the repository at this point in the history
  • Loading branch information
gdesmar committed Jul 26, 2024
1 parent 71d7ce9 commit 5ec4673
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@ on:
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 ..
cmake -DUSE_STATIC_LIBS=ON ..
make
strip innoextract
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion src/stream/slice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#include <boost/cstdint.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/directory.hpp>
// Debian Buster has Boost Filesystem 1.67.0.1 installed by default
// directory.hpp was split from the main in 1.72
// https://www.boost.org/users/history/version_1_72_0.html
// #include <boost/filesystem/directory.hpp>

#include "util/console.hpp"
#include "util/load.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/util/encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@

#include "util/log.hpp"
#include "util/math.hpp"
#include <unordered_map>

namespace util {

Expand Down

0 comments on commit 5ec4673

Please sign in to comment.