-
Notifications
You must be signed in to change notification settings - Fork 86
executable file
·158 lines (143 loc) · 5.38 KB
/
Copy pathcompilation.yml
File metadata and controls
executable file
·158 lines (143 loc) · 5.38 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: CI
on:
push:
paths-ignore:
- '**.md'
- '**.rst'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
repository_dispatch:
types:
- run_build
- run_release
workflow_dispatch: {}
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
DEBIAN_FRONTEND: noninteractive
TZ: Japan
jobs:
build:
strategy:
matrix:
os:
- runs-on: macos-latest
architecture: arm64
shell: bash
container: null
container-options: " "
macos-package-manager: brew
- runs-on: macos-15-intel
architecture: x86_64
shell: bash
container: null
container-options: " "
macos-package-manager: brew
- runs-on: macos-latest
architecture: arm64
shell: bash
container: null
container-options: " "
macos-package-manager: port
- runs-on: ubuntu-latest
architecture: x86_64
shell: bash
container: "ubuntu:20.04"
container-options: "--user 0"
macos-package-manager: null
- runs-on: ubuntu-24.04-arm
architecture: arm64
shell: bash
container: "ubuntu:20.04"
container-options: "--user 0"
macos-package-manager: null
- runs-on: windows-latest
architecture: x86_64
shell: msys2
container: null
container-options: " "
macos-package-manager: null
fail-fast: false
runs-on: ${{ matrix.os.runs-on }}
defaults:
run:
shell: ${{ matrix.os.shell }} {0}
container:
image: ${{ matrix.os.container }}
options: ${{ matrix.os.container-options }}
timeout-minutes: 240
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install Ubuntu packages
if: startsWith(matrix.os.runs-on, 'ubuntu')
run: |
apt-get -y update
apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install texinfo bison flex gettext autopoint autoconf automake libgmp3-dev libmpfr-dev libmpc-dev cmake g++ gcc git libgsl-dev make patch zlib1g-dev wget curl
- name: Install macOS packages (brew)
if: startsWith(matrix.os.runs-on, 'macos') && matrix.os.macos-package-manager == 'brew'
run: |
brew update
brew install texinfo bison flex gnu-sed autoconf automake libtool gsl gmp mpfr libmpc md5sha1sum wget curl
- name: Install macOS packages (port)
if: startsWith(matrix.os.runs-on, 'macos') && matrix.os.macos-package-manager == 'port'
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
. ./macports-ci install --remove-brew --version=2.11.5 --sync=rsync
sudo port install gsl gmp mpfr libmpc libiconv bison flex gsed texinfo autoconf automake libtool md5sha1sum wget curl cmake
- name: Install MSYS2 packages
if: startsWith(matrix.os.runs-on, 'windows')
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
install: |
base-devel git make texinfo flex bison patch binutils mpc-devel tar wget curl
autotools gettext gettext-devel
mingw-w64-i686-readline mingw-w64-i686-gcc mingw-w64-i686-cmake
mingw-w64-i686-make mingw-w64-i686-libogg mingw-w64-i686-libgnurx
update: true
- name: Runs all the stages in the shell
run: |
. ./config/ci-env.sh
if test -f ./build-all.sh; then ./build-all.sh; fi
if test -f ./toolchain.sh; then ./toolchain.sh; fi
- name: Print version of executables
run: |
if test -f ./config/ci-print-version.sh; then ./config/ci-print-version.sh; fi
- name: Get short SHA
id: slug
run: printf '%s\n' "sha8=$(printf '%s\n' ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Compress ps2dev folder
run: |
tar -zcvf ps2dev-${{ matrix.os.runs-on }}.tar.gz ps2dev
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ github.event.repository.name }}-${{ matrix.os.runs-on }}-ps2dev-${{ matrix.os.architecture }}-${{ matrix.os.macos-package-manager }}-${{ steps.slug.outputs.sha8 }}
path: ps2dev-${{ matrix.os.runs-on }}.tar.gz
- name: Extract tag name
if: startsWith(github.ref, 'refs/tags/')
id: tag
run: printf 'VERSION=%s\n' "${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Create pre-release
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && github.event.repository.name == 'ps2dev' && matrix.os.macos-package-manager != 'port'
uses: softprops/action-gh-release@v3
with:
files: ps2dev-${{ matrix.os.runs-on }}.tar.gz
prerelease: true
name: "Development build"
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: startsWith(github.ref, 'refs/tags/') && github.event.repository.name == 'ps2dev' && matrix.os.macos-package-manager != 'port'
uses: softprops/action-gh-release@v3
with:
files: ps2dev-${{ matrix.os.runs-on }}.tar.gz
tag_name: ${{ steps.tag.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}