Files
cpu-check/.github/workflows/build-alpine.yml
Eric Liu 4ef3eec229
Some checks failed
Build Debian Package / build-debian (push) Successful in 2m3s
Build Alpine Package / build-alpine (push) Failing after 2m26s
Add curl package for Gitea Alpine Package Registry upload
- Install curl package in Alpine build workflow
- Ensure curl is available for package upload step
- Prepare for package registry upload with authentication
2025-02-01 07:11:38 +00:00

88 lines
2.7 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 linux-headers zlib-dev zlib-static openssl-dev openssl-libs-static musl-dev
- 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
- name: Build cpu-check Alpine Package
run: |
mkdir -p alpine_build && cd alpine_build
cmake -DCMAKE_BUILD_TYPE=Release \
-DUSE_CLANG=ON \
-DBUILD_STATIC=ON \
..
make
# Create package metadata
mkdir -p pkg/APKBUILD
cat > pkg/APKBUILD/APKBUILD << EOF
# Contributor: Maintainer <maintainer@example.com>
# Maintainer: Maintainer <maintainer@example.com>
pkgname=cpu-check
pkgver=${{ env.PKG_VERSION }}
pkgrel=${{ env.PKG_RELEASE }}
pkgdesc="CPU validation and stress testing tool"
url="https://github.com/google/cpu-check"
arch="x86_64"
license="Apache-2.0"
depends=""
makedepends="cmake clang llvm linux-headers zlib-dev zlib-static openssl-dev openssl-libs-static musl-dev"
source=""
options="!check"
EOF
make apk
- name: Upload cpu-check Alpine Package
uses: actions/upload-artifact@v3
with:
name: cpu-check-alpine
path: alpine_build/*.apk
- name: Upload to Gitea Alpine Package Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
apk add --no-cache curl
curl --user "eric:df299a6e592a8bd829d018b7816e76d03756408d" \
--upload-file alpine_build/cpu-check-${{ env.PKG_VERSION }}-r${{ env.PKG_RELEASE }}.apk \
"https://git.ericxliu.me/api/packages/eric/alpine/v3.17/main"