Skip to content

Commit

Permalink
build-test
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Mar 26, 2024
1 parent ad41935 commit e168851
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 2 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build packages

on:
push:
paths:
- '*.yaml'

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
deb: amd64
- os: nscloud-ubuntu-22.04-arm64-2x8
arch: arm64
deb: arm64
runs-on: ${{ matrix.os }}
container:
image: ghcr.io/wolfi-dev/sdk:latest
options: |
--cap-add NET_ADMIN --cap-add SYS_ADMIN --device /dev/fuse --security-opt seccomp=unconfined --security-opt apparmor:unconfined
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install rclone
run: |
cd /tmp
curl -o rclone.zip -L https://downloads.rclone.org/rclone-current-linux-${{ matrix.deb }}.zip
unzip rclone.zip
cp rclone*/rclone /usr/bin/
rm -rf rclone*
- name: Rclone Setup
run: |
mkdir -p $HOME/.config/rclone
cat <<EOF > $HOME/.config/rclone/rclone.conf
[Packages]
type = s3
provider = Cloudflare
env_auth = true
region = auto
endpoint = https://963ff7fb9c523564b5f3a398ab39d488.r2.cloudflarestorage.com
EOF
- name: Create packages directory
run: mkdir -p packages

- name: Get signing key
run: |
echo "${{ secrets.SIGNING_KEY }}" | base64 -d > php-signing.rsa
- name: Look for changed files
id: changes
uses: tj-actions/changed-files@v43
with:
files_yaml: |
melange:
- ./*.yaml
- name: Build packages
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
rclone mount Packages:wolfi-php packages --allow-other --write-back-cache --vfs-cache-mode full -vvv &
sleep 5
pid=$!
for file in ${{ steps.changes.outputs.melange_all_changed_files }}; do
if [[ $file == ".yam.yaml" ]]; then
continue
fi
melange build \
--arch ${{ matrix.arch }} \
-r https://packages.wolfi.dev/os \
-k https://packages.wolfi.dev/os/wolfi-signing.rsa.pub \
--signing-key php-signing.rsa \
$file
done
kill $pid
4 changes: 2 additions & 2 deletions php-8.1-excimer.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: php-8.1-excimer
version: 1.2.0
version: 1.2.1
epoch: 0
description: "Excimer is a PHP extension that provides an interrupting timer and a low-overhead sampling profiler."
copyright:
Expand All @@ -24,7 +24,7 @@ pipeline:
with:
repository: https://github.com/wikimedia/mediawiki-php-excimer
tag: "${{package.version}}"
expected-commit: 4cc649be12183c672867e9184d09d7cd9c604d91
expected-commit: 986209d032a1cc53ac930e44f50acb74ecee8816

- name: Prepare build
runs: phpize
Expand Down

0 comments on commit e168851

Please sign in to comment.