Skip to content

Commit

Permalink
ci: add a GitHub workflow to test builds on Alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
adonis0147 committed Nov 1, 2024
1 parent 9ebc1f2 commit e8a8596
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
1 change: 0 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ build_packages_task:
cat >>Dockerfile <<EOF
FROM centos:7
RUN ${cmd}
RUN yum install -y file
RUN mkdir /devel-env
WORKDIR /devel-env
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Packages on Alpine

on:
- push
- pull_request

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4

- name: Build
run: |
devel/downloads/download_packages.sh
curl -L "$(curl -L https://api.github.com/repos/adonis0147/devel-env/releases/latest |
sed -n 's|[[:space:]]*"browser_download_url": "\(.*\)\"|\1|p' |
grep "$(uname -m | sed 's/arm64/aarch64/')")" -o devel/scripts/install_toolchain.sh
chmod a+x devel/scripts/install_toolchain.sh
cat >>Dockerfile <<EOF
FROM alpine:latest
RUN apk add bash libc6-compat
RUN mkdir /devel-env
WORKDIR /devel-env
EOF
docker build -t packages .
docker run --rm --mount=type=bind,source="$(pwd)",target=/devel-env packages \
bash -c 'cd devel/scripts; bash install.sh'

0 comments on commit e8a8596

Please sign in to comment.