Kirizaki / Kirizaki/libArchStatic

Make GitHub Action for mac OS faster

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Current implementation is rebuilding of prereqs from source:
### .github/workflows/build-macos.yml:
```
- name: "Build static dependencies (macOS)"
if: matrix.sys == 'macos'
run: |
mkdir -p $HOME/deps

# zlib
git clone https://github.com/madler/zlib.git
cd zlib
mkdir build && cd build
cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=$HOME/deps/zlib
cmake --build . --target install -- -j$NUM_CORES
cd ../..

# bzip2
git clone https://sourceware.org/git/bzip2.git
cd bzip2
make -f Makefile-libbz2_so clean
make libbz2.a
mkdir -p $HOME/deps/bzip2/lib $HOME/deps/bzip2/include
cp libbz2.a $HOME/deps/bzip2/lib/
cp bzlib.h $HOME/deps/bzip2/include/
cd ..

# xz (liblzma)
git clone https://github.com/tukaani-project/xz.git
cd xz
./autogen.sh --no-po4a # skip man pages
./configure --disable-shared --enable-static --prefix=$HOME/deps/xz
make -j$NUM_CORES && make install
cd ..

# zstd
git clone https://github.com/facebook/zstd.git
cd zstd/build/cmake
mkdir build && cd build
cmake .. -DZSTD_BUILD_SHARED=OFF -DZSTD_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX=$HOME/deps/zstd
cmake --build . --target install -- -j$NUM_CORES
cd ../../../..

# openssl
git clone https://github.com/openssl/openssl.git
cd openssl
./Configure darwin64-x86_64-cc no-shared --prefix=$HOME/deps/openssl
make -j$NUM_CORES && make install_sw
cd ..

# libarchive (without libiconv)
git clone https://github.com/libarchive/libarchive.git
cd libarchive
mkdir -p build && cd build
cmake .. -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -DENABLE_ICONV=OFF -DCMAKE_INSTALL_PREFIX=$HOME/deps/libarchive
cmake --build . --target install -- -j$NUM_CORES
cd ../..
```

It would be great to find precompiled binaries to make the build faster.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with .github/workflows/build-macos.yml and review the macOS dependency build step for zlib, bzip2, xz, zstd, OpenSSL, and libarchive. Investigate available precompiled binaries or caching options, then verify that the workflow completes successfully with the same static dependencies and takes less time.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, github-actions, macos
Domain
build-system, ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.