- Install Git in the Alpine Linux container - Ensure Git is available for repository checkout - Resolve potential Git-related issues in the workflow
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
name: Build Alpine Package
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
PKG_VERSION: "2.2.0"
|
|
PKG_RELEASE: "1"
|
|
ABSEIL_VERSION: "20230125.3"
|
|
|
|
jobs:
|
|
build-alpine:
|
|
runs-on: ubuntu-latest
|
|
container: node:current-alpine
|
|
|
|
steps:
|
|
- name: Install Git
|
|
run: |
|
|
apk add --no-cache git
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Alpine Packaging Dependencies
|
|
run: |
|
|
apk update
|
|
apk add alpine-sdk cmake clang llvm
|
|
|
|
- name: Build Static Abseil
|
|
run: |
|
|
git clone https://github.com/abseil/abseil-cpp.git
|
|
cd abseil-cpp
|
|
mkdir build && cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
|
-DABSL_BUILD_TESTING=OFF \
|
|
-DABSL_USE_GOOGLETEST_HEAD=OFF \
|
|
-DCMAKE_CXX_STANDARD=17 \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
..
|
|
make -j$(nproc)
|
|
make install
|
|
ldconfig
|
|
|
|
- name: Build Alpine Package
|
|
run: |
|
|
mkdir -p alpine_build && cd alpine_build
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DUSE_CLANG=ON \
|
|
-DBUILD_STATIC=ON \
|
|
..
|
|
make
|
|
# Example packaging command; adjust according to your packaging scripts
|
|
make apk
|
|
|
|
- name: Upload Alpine Package
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: cpu-check-alpine
|
|
path: alpine_build/*.apk |