Skip to content

Commit

Permalink
Add github action to compile and release on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
gdesmar authored Jul 26, 2024
1 parent b7c3301 commit 1465edd
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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 zlib.
container: debian:buster
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake libboost-all-dev liblzma-dev
# Only because we are running on debian:buster
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
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 1465edd

Please sign in to comment.