Skip to content

Commit 377a44b

Browse files
committed
.github: Initial Github Actions
- Based on: https://github.com/RPCS3/rpcs3/tree/master/.github/workflows https://github.com/Caio99BR/pkgi-ps3-nopaystation/tree/main/.github/workflows - Currently building only for Ubuntu x64, Windows (intel32 and x86_64) and Aarch64 - SCCache is used as default to speed up subsequent builds (each build takes ~3m, after caching) - "LLVM/Clang/LLD based mingw-w64 toolchain" (nightly builds) is used as default - Many improvements can be made for this, as well support for others archs, but this is the initial implementation Signed-off-by: Caio Oliveira <[email protected]>
1 parent d1372de commit 377a44b

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

.github/workflows/build-praat.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Building Praat!
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
7+
8+
jobs:
9+
Build:
10+
strategy:
11+
matrix:
12+
include:
13+
- version: aarch64
14+
targetos: windows
15+
ccache_path: sccache
16+
toolchain: llvm-mingw-nightly-ucrt-ubuntu-22.04-x86_64
17+
prefix: aarch64-w64-mingw32-
18+
makefile: makefile.defs.msys-clang
19+
binary: Praat.exe
20+
extension: .exe
21+
- version: x86_64
22+
targetos: windows
23+
ccache_path: sccache
24+
toolchain: llvm-mingw-nightly-ucrt-ubuntu-22.04-x86_64
25+
prefix: x86_64-w64-mingw32-
26+
makefile: makefile.defs.msys-clang
27+
binary: Praat.exe
28+
extension: .exe
29+
- version: intel32
30+
targetos: windows
31+
ccache_path: sccache
32+
toolchain: llvm-mingw-nightly-ucrt-ubuntu-22.04-x86_64
33+
prefix: i686-w64-mingw32-
34+
makefile: makefile.defs.msys-clang
35+
binary: Praat.exe
36+
extension: .exe
37+
- version: clang
38+
targetos: linux
39+
ccache_path: sccache
40+
toolchain: llvm-mingw-nightly-ucrt-ubuntu-22.04-x86_64
41+
prefix: ""
42+
makefile: makefile.defs.linux.pulse-clang
43+
binary: praat
44+
extension: ""
45+
46+
name: Praat (${{ matrix.version }}) (${{ matrix.binary }})
47+
runs-on: ubuntu-22.04
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: hendrikmuhs/ccache-action@main
52+
with:
53+
key: ${{ runner.os }}-${{ matrix.version }}-ccache
54+
variant: sccache
55+
56+
- name: Install dependencies
57+
run: sudo apt install -y make rsync pkg-config libgtk-3-dev libasound2-dev libpulse-dev libjack-dev clang gcc g++ binutils binutils-mingw-w64 xvfb wget
58+
59+
- name: Download and Install LLVM-Mingw toolchain
60+
run: |
61+
wget https://github.com/mstorsjo/llvm-mingw/releases/download/nightly/${{ matrix.toolchain }}.tar.xz
62+
tar -xvf ${{ matrix.toolchain }}.tar.xz
63+
64+
- name: Build Praat
65+
run: |
66+
cp makefiles/${{ matrix.makefile }} makefile.defs
67+
make -j$(nproc) \
68+
PREFIX="$(pwd)/${{ matrix.toolchain }}/bin/${{ matrix.prefix }}" \
69+
CC="${{ matrix.ccache_path }} $(pwd)/${{ matrix.toolchain }}/bin/${{ matrix.prefix }}clang" \
70+
CXX="${{ matrix.ccache_path }} $(pwd)/${{ matrix.toolchain }}/bin/${{ matrix.prefix }}clang++"
71+
cp ${{ matrix.binary }} Praat-${{ matrix.targetos }}_${{ matrix.version }}${{ matrix.extension }}
72+
73+
- name: Upload binary
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: Praat for ${{ matrix.targetos }} ${{ matrix.version }}
77+
path: Praat-${{ matrix.targetos }}_${{ matrix.version }}${{ matrix.extension }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Praat
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
prerelease:
7+
description: 'Nightly?'
8+
required: false
9+
default: 'true'
10+
type: choice
11+
options:
12+
- 'true'
13+
- 'false'
14+
15+
jobs:
16+
call-build:
17+
uses: ./.github/workflows/build-praat.yml
18+
secrets: inherit
19+
20+
release:
21+
name: 🚀 Publish Release
22+
needs: call-build
23+
runs-on: ubuntu-22.04
24+
permissions:
25+
contents: write
26+
steps:
27+
- name: 🏮 Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: 🗅 Get current date
31+
id: date
32+
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
33+
34+
- name: 📤 Download artifacts
35+
uses: actions/download-artifact@v4
36+
with:
37+
path: artifacts
38+
39+
- name: 📥 Upload binaries to release
40+
uses: ncipollo/[email protected]
41+
with:
42+
artifacts: artifacts/*/*
43+
allowUpdates: true
44+
replacesArtifacts: true
45+
tag: latest
46+
name: "Praat Release ${{ steps.date.outputs.NOW }}"
47+
prerelease: ${{ github.event.inputs.prerelease == 'true' }}

0 commit comments

Comments
 (0)