forked from glankk/gz
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (99 loc) · 3.12 KB
/
devbuild.yml
File metadata and controls
112 lines (99 loc) · 3.12 KB
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
name: Build development release
on:
workflow_dispatch:
inputs:
pkg_name:
description: 'Package name (empty for default)'
default: ''
type: string
pkg_version:
description: 'Package version (empty for default)'
default: ''
type: string
push:
branches:
- master
jobs:
build-platforms:
name: Build platform packages
uses: PracticeROM/gz-release/.github/workflows/build-platforms.yml@master
with:
repository: PracticeROM/gz-release
ref: master
build-gz:
name: Build gz
needs: build-platforms
runs-on: ubuntu-latest
container:
image: practicerom/practicerom-dev
options: --privileged
steps:
- name: Update system package index
run: |
sudo apt-get update
- name: Install system packages
run: |
sudo apt-get install -y gpg hfsprogs libguestfs-tools linux-image-generic nodejs unzip xz-utils zip
sudo chmod a+r /boot/vmlinuz-*
sudo chmod 0666 /dev/kvm
- name: Checkout gz-release
uses: actions/checkout@v4
with:
repository: PracticeROM/gz-release
ref: master
- name: Fetch platform packages
uses: actions/download-artifact@v5
with:
path: platforms
pattern: platform-*
merge-multiple: true
- name: Checkout git repository
uses: actions/checkout@v4
with:
path: gz
fetch-depth: 0
submodules: true
- name: Fetch source binaries
env:
SOURCES_CMD: ${{ secrets.SOURCES_CMD }}
# Put the desired source binaries under roms/
run: sh -c "${SOURCES_CMD}"
- name: Run gz-release
env:
PKG_NAME: ${{ inputs.pkg_name }}
PKG_VERSION: ${{ inputs.pkg_version }}
run: |
EXTRA_CPPFLAGS='-DNO_GP' \
EXTRA_CFLAGS='-n64-dynamic' \
EXTRA_CXXFLAGS='-n64-dynamic' \
EXTRA_LDFLAGS='-n64-dynamic' \
./gz-release -j$(nproc) -p all gz \
${PKG_NAME:+-n "${PKG_NAME}"} \
${PKG_VERSION:+-v "${PKG_VERSION}"}
- name: Install artifact client
uses: lhotari/gh-actions-artifact-client@v2
- name: Collect and upload artifacts
id: artifacts
run: |
files=$(
find . -maxdepth 1 -type f \( \
-name '*.tar.gz' -o \
-name '*.tar.xz' -o \
-name '*.zip' -o \
-name '*.7z' -o \
-name '*.dmg' \)
)
echo "files<<EOF" >> "${GITHUB_OUTPUT}"
for f in ${files}; do
echo "${f}" >> "${GITHUB_OUTPUT}"
cat "${f}" | gh-actions-artifact-client.js upload $(basename "${f}")
done
echo "EOF" >> "${GITHUB_OUTPUT}"
- name: Update development build
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: dev-latest
prerelease: true
title: Latest development build
files: ${{ steps.artifacts.outputs.files }}