Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [alpine-3.17, ubuntu-20.04, ubuntu-22.04]
os: [alpine-3.17, alpine-3.21, ubuntu-20.04, ubuntu-22.04]
platform: [linux/amd64]
include:
- os: alpine-3.17
platform: linux/arm64
- os: alpine-3.21
platform: linux/arm64
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
15 changes: 14 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ alpine-3.17:
rm -rf /var/cache/apk/*
RUN apk add openjdk8-jre

alpine-3.21:
FROM --platform=$BUILDPLATFORM alpine:3.21
RUN apk add --no-progress --update git build-base zip
RUN apk --no-cache --update add libgcc libstdc++ \
git make g++ \
build-base gtest gtest-dev boost boost-dev protobuf protobuf-dev cmake icu icu-dev openssl \
&& \
rm -rf /var/cache/apk/*
RUN apk add openjdk8-jre
ENV LIB_DEPS=absl::absl_check

ubuntu-20.04:
FROM --platform=$BUILDPLATFORM ubuntu:20.04
RUN apt-get update && apt-get -y upgrade
Expand Down Expand Up @@ -47,10 +58,12 @@ libphonenumber:

WORKDIR /libphonenumber/cpp/build
RUN mkdir assets
RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=./assets ..
RUN sed -i 's/absl::synchronization/absl::synchronization ${LIB_DEPS}/' ../CMakeLists.txt
RUN cmake -DLIB_DEPS=${LIB_DEPS} -DCMAKE_INSTALL_PREFIX:PATH=./assets ..
RUN make install

WORKDIR assets
RUN rm -rf lib/cmake
RUN zip -r ../libphonenumber_${TARGETARCH}-${buildos}.zip *

SAVE ARTIFACT /libphonenumber/cpp/build/libphonenumber_${TARGETARCH}-${buildos}.zip AS LOCAL cpp/build/libphonenumber_${TARGETARCH}-${buildos}.zip
Expand Down
Loading