-
Notifications
You must be signed in to change notification settings - Fork 1
161 lines (139 loc) · 5.25 KB
/
make.yml
File metadata and controls
161 lines (139 loc) · 5.25 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
159
160
161
name: Win/Mac/Linux
on:
push:
branches:
- binutils-2_45_1-cedev
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-22.04, macos-15-intel, macos-14, windows-latest]
include:
- runs-on: ubuntu-22.04
install-output-ext: "tar.gz"
- runs-on: macos-15-intel
arch-suffix: "-intel"
install-output-ext: "tar.gz"
- runs-on: macos-14
arch-suffix: "-arm"
install-output-ext: "tar.gz"
- runs-on: windows-latest
install-output-ext: "tar.gz"
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout binutils
uses: actions/checkout@v4
with:
submodules: recursive
- name: "[Linux] Install dependencies"
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y texinfo
- name: "[macOS] Install dependencies"
if: runner.os == 'macOS'
run: brew install texinfo
- name: Setup MSYS2
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
cache: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-autotools
mingw-w64-x86_64-gettext-tools
make
texinfo
bison
flex
- name: "[Linux] Build binutils"
if: runner.os == 'Linux'
shell: bash
run: |
./configure --target=z80-none-elf --with-zstd=no --disable-gdb --disable-sim --disable-readline --disable-nls --prefix="${{ runner.temp }}/binutils"
make -j4 && make install-strip -j4
- name: "[macOS] Build binutils"
if: runner.os == 'macOS'
shell: bash
run: |
./configure --target=z80-none-elf --with-zstd=no --disable-gdb --disable-sim --disable-readline --disable-nls --with-system-zlib --prefix="${{ runner.temp }}/binutils"
make -j4 && make install-strip -j4
- name: "[Windows] Build binutils"
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
PREFIX=$(cygpath -m "${{ runner.temp }}/binutils")
./configure --target=z80-none-elf --with-zstd=no --disable-gdb --disable-sim --disable-readline --disable-nls --disable-shared --enable-static --prefix="$PREFIX"
make configure-host && make -j4 LDFLAGS="-all-static" MAKEINFO=true && make install-strip -j4 MAKEINFO=true
- name: "[Unix] Tar install"
if: runner.os != 'Windows'
shell: bash
run: |
cd ${{ runner.temp }} && tar -chzvf binutils-${{ runner.os }}.${{ matrix.install-output-ext }} --exclude='z80-none-elf' binutils
mv ${{ runner.temp }}/binutils-${{ runner.os }}.${{ matrix.install-output-ext }} ${{github.workspace}}
- name: "[Windows] Tar install"
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd ${{ runner.temp }} && tar -chzvf binutils-${{ runner.os }}.${{ matrix.install-output-ext }} --exclude='z80-none-elf' binutils
mv ${{ runner.temp }}/binutils-${{ runner.os }}.${{ matrix.install-output-ext }} ${{github.workspace}}
- name: Upload binutils
uses: actions/upload-artifact@v4
with:
name: binutils-${{ runner.os }}${{ matrix.arch-suffix }}
path: binutils-${{ runner.os }}.${{ matrix.install-output-ext }}
nightly:
runs-on: ubuntu-latest
needs: [build]
if: github.event_name != 'pull_request'
steps:
- name: Download Ubuntu binutils
uses: actions/download-artifact@v4
with:
name: binutils-Linux
path: ${{github.workspace}}/ubuntu
- name: Download macOS Intel binutils
uses: actions/download-artifact@v4
with:
name: binutils-macOS-intel
path: ${{github.workspace}}/macos-intel
- name: Download macOS ARM binutils
uses: actions/download-artifact@v4
with:
name: binutils-macOS-arm
path: ${{github.workspace}}/macos-arm
- name: Download Windows binutils
uses: actions/download-artifact@v4
with:
name: binutils-Windows
path: ${{github.workspace}}/windows
- name: Create Ubunutu Nightly
run: |
cd ubuntu
mv binutils-Linux.tar.gz ../binutils_ubuntu_nightly.tar.gz
- name: Create macOS Intel Nightly
run: |
cd macos-intel
mv binutils-macOS.tar.gz ../binutils_macos_intel_nightly.tar.gz
- name: Create macOS ARM Nightly
run: |
cd macos-arm
mv binutils-macOS.tar.gz ../binutils_macos_arm_nightly.tar.gz
- name: Create Windows Nightly
run: |
cd windows
tar -xzvf binutils-Windows.tar.gz
zip -r9 ../binutils_windows_nightly.zip binutils
- name: Create Nightly Release
uses: softprops/action-gh-release@5122b4edc95f85501a71628a57dc180a03ec7588
with:
tag_name: nightly
name: Nightly Build
prerelease: true
files: |
binutils_ubuntu_nightly.tar.gz
binutils_macos_intel_nightly.tar.gz
binutils_macos_arm_nightly.tar.gz
binutils_windows_nightly.zip