-
Notifications
You must be signed in to change notification settings - Fork 4
114 lines (98 loc) · 3.45 KB
/
compilation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Compile PSG play
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-atari-st:
runs-on: ubuntu-latest
container: ghcr.io/frno7/gentoo-m68k:main
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Archive tag
run: |
echo "ARCHIVE_TAG=${GITHUB_REF_NAME}-${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Fix repository ownership problem
run: |
# Avoid fatal: unsafe repository (directory is owned by someone else)
# Confer https://github.com/actions/checkout/issues/760
git config --global --add safe.directory "*"
- name: Compile PSGPLAY.TOS archive for the Atari ST
run: |
script/compile arch atari-st
- name: Publish PSGPLAY.TOS archive for the Atari ST
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: "psgplay-atari-st-${{ env.ARCHIVE_TAG }}"
if-no-files-found: error
compression-level: 9
path: PSGPLAY.TOS
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Archive tag
run: |
echo "ARCHIVE_TAG=${GITHUB_REF_NAME}-${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- uses: mymindstorm/setup-emsdk@v14
- name: Compile web assembly archive
run: |
script/compile arch web
- name: Publish web assembly archive
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: "psgplay-web-${{ env.ARCHIVE_TAG }}"
if-no-files-found: error
compression-level: 9
path: |
lib/psgplay/libpsgplay.js
lib/psgplay/libpsgplay.wasm
build-linux:
strategy:
fail-fast: false # 'false' means don't stop if some archs fail.
matrix:
arch: [ppc64le, aarch64, x86_64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Archive tag
run: |
echo "ARCHIVE_TAG=${{ matrix.arch }}-${GITHUB_REF_NAME}-${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- uses: uraimo/run-on-arch-action@v2.2.0
name: Compile PSG play archive for Linux/${{ matrix.arch }}
if: ${{ matrix.arch != 'x86_64' }}
with:
arch: ${{ matrix.arch }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
install: |
apt-get update -q -y
apt-get install -q -y git make gcc libc-dev xxd libasound2 libasound2-dev
run: |
# Avoid fatal: unsafe repository (directory is owned by someone else)
# Confer https://github.com/actions/checkout/issues/760
git config --global --add safe.directory "*"
rm -f build-log.txt
script/compile arch ${{ matrix.arch }}
- name: Compile PSG play archive for Linux/x86_64
if: ${{ matrix.arch == 'x86_64' }}
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y git make gcc clang libc-dev xxd libasound2 libasound2-dev
script/compile arch ${{ matrix.arch }}
- name: Publish PSG play archive for Linux
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: "psgplay-linux-${{ env.ARCHIVE_TAG }}"
if-no-files-found: error
compression-level: 9
path: psgplay