Skip to content

Commit 9db99f8

Browse files
committed
GH action
1 parent cd6c09a commit 9db99f8

6 files changed

Lines changed: 154 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
arch: [amd64, arm64]
17+
steps:
18+
- name: Checkout phiola
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Get the dependencies
24+
run: |
25+
git clone --depth=1 https://github.com/stsaz/netmill ../netmill
26+
git clone --depth=1 https://github.com/stsaz/avpack ../avpack
27+
git clone --depth=1 https://github.com/stsaz/ffaudio ../ffaudio
28+
git clone --depth=1 https://github.com/stsaz/ffpack ../ffpack
29+
git clone --depth=1 https://github.com/stsaz/ffgui ../ffgui
30+
git clone --depth=1 https://github.com/stsaz/ffsys ../ffsys
31+
git clone --depth=1 https://github.com/stsaz/ffbase ../ffbase
32+
33+
- name: Create builder image
34+
run: |
35+
if [[ "${{ matrix.arch }}" == "amd64" ]]; then
36+
podman build -t phiola-amd64-builder -f builder/Dockerfile.linux-amd64 .
37+
else
38+
podman build -t phiola-arm64-builder -f builder/Dockerfile.linux-arm64 .
39+
fi
40+
41+
- name: Build for ${{ matrix.arch }}
42+
run: |
43+
podman run --rm \
44+
-v $(pwd)/..:/src:Z \
45+
-w /src/phiola \
46+
phiola-${{ matrix.arch }}-builder \
47+
bash builder/build.sh ${{ matrix.arch }} '${{ github.ref_name }}'
48+
49+
- name: Upload artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: phiola-${{ matrix.arch }}
53+
path: |
54+
_linux-${{ matrix.arch }}/phiola_*.deb
55+
_linux-${{ matrix.arch }}/phiola-*.rpm
56+
_linux-${{ matrix.arch }}/phiola-*.tar.zst
57+
58+
release:
59+
needs: build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout phiola
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Download all artifacts
68+
uses: actions/download-artifact@v4
69+
with:
70+
path: artifacts
71+
72+
- name: Generate release notes
73+
run: |
74+
bash builder/release-notes.sh '${{ github.ref_name }}'
75+
76+
- name: Create GitHub Release
77+
uses: softprops/action-gh-release@v2
78+
with:
79+
files: |
80+
artifacts/phiola-amd64/*.deb
81+
artifacts/phiola-amd64/*.rpm
82+
artifacts/phiola-amd64/*.tar.zst
83+
artifacts/phiola-arm64/*.deb
84+
artifacts/phiola-arm64/*.rpm
85+
artifacts/phiola-arm64/*.tar.zst
86+
draft: true
87+
body_file: release-notes.txt

alib3/soxr/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include ../config.mk
44

55
VER := edbdb4081db14eb21729b57c4f2c813514ad0259
6-
URL := https://github.com/dofuuz/soxr/archive/soxr-$(VER).zip
6+
URL := https://github.com/stsaz/phiola/raw/alib3/alib3/soxr/soxr-$(VER).zip
77
SHA256SUM := 9ba7b105e219452d7116e09b0af011ab097c6a2285723611a504bb0d2ef610a8
88
PKG := $(ALIB3)/soxr/soxr-$(VER).zip
99
DIR := soxr-$(VER)

alib3/wavpack/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include ../config.mk
44

55
VER := 4.75.0
6-
URL := http://www.wavpack.com/wavpack-$(VER).tar.bz2
6+
URL := https://github.com/stsaz/phiola/raw/alib3/alib3/wavpack/wavpack-$(VER).tar.bz2
77
SHA256SUM := c63e5c2106749dc6b2fb4302f2260f4803a93dd6cadf337764920dc836e3af2e
88
PKG := $(ALIB3)/wavpack/$(notdir $(URL))
99
DIR := wavpack-$(VER)

builder/build.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
# phiola release builder
3+
4+
if [[ $# != 2 ]]; then
5+
echo "Usage: build.sh CPU TAG"
6+
exit 1
7+
fi
8+
9+
set -xeu
10+
CPU="$1"
11+
TAG="$2"
12+
13+
# "v1.0" -> "1.0"
14+
PKG_VER="${TAG#v}"
15+
16+
if [[ "$CPU" == "amd64" ]]; then
17+
export PATH="$PATH:/usr/lib/llvm-19/bin"
18+
mkdir -p _linux-amd64
19+
make -j$(nproc) \
20+
-C _linux-amd64 \
21+
-f ../Makefile \
22+
ROOT_DIR=../.. \
23+
COMPILER=clang \
24+
CFLAGS_USER=-fno-diagnostics-color \
25+
PKG_VER="$PKG_VER" \
26+
release
27+
else
28+
export PATH="$PATH:/usr/lib/llvm-19/bin"
29+
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
30+
mkdir -p _linux-arm64
31+
make -j$(nproc) \
32+
-C _linux-arm64 \
33+
-f ../Makefile \
34+
ROOT_DIR=../.. \
35+
COMPILER=clang \
36+
CPU=arm64 \
37+
CFLAGS_USER=-fno-diagnostics-color \
38+
PHI_HTTP_SSL=0 \
39+
PKG_VER="$PKG_VER" \
40+
release
41+
fi

builder/changelog.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

builder/release-notes.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# phiola: Generate release notes for the given tag
3+
4+
if [[ $# != 1 ]]; then
5+
echo "Usage: $0 TAG"
6+
exit 1
7+
fi
8+
9+
set -xe
10+
TO="$1"
11+
12+
# Find previous tag
13+
SINCE=$(git tag --sort=-version:refname | grep -A1 "^${TO}$" | tail -1)
14+
15+
{
16+
echo "Changes since ${SINCE}:"
17+
echo '```'
18+
git log --format=%B "$SINCE..$TO" \
19+
| grep -P '^[\+\!\-\*]' \
20+
| sed -e 's/^\+/1\+/' -e 's/^\!/2\!/' -e 's/^\*/3\*/' -e 's/^\-/4\-/' \
21+
| sort -V \
22+
| cut -c 2-
23+
echo '```'
24+
} > release-notes.txt

0 commit comments

Comments
 (0)