Skip to content

Commit 52f083a

Browse files
committed
Fix CI
1 parent 4b8c939 commit 52f083a

1 file changed

Lines changed: 59 additions & 25 deletions

File tree

.github/workflows/make.yml

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- binutils-2_45_1-cedev
7+
workflow_dispatch:
78

89
jobs:
910
build:
@@ -12,50 +13,83 @@ jobs:
1213
matrix:
1314
runs-on: [ubuntu-22.04, macos-15-intel, macos-14, windows-latest]
1415
include:
15-
- nul: /dev/null
16+
- runs-on: ubuntu-22.04
17+
install-output-ext: "tar.gz"
1618
- runs-on: macos-15-intel
1719
arch-suffix: "-intel"
18-
install-output-ext: "dmg"
20+
install-output-ext: "tar.gz"
1921
- runs-on: macos-14
2022
arch-suffix: "-arm"
21-
install-output-ext: "dmg"
23+
install-output-ext: "tar.gz"
2224
- runs-on: windows-latest
23-
env: "env:"
24-
exe: .exe
25-
nul: nul
26-
install-output-ext: "zip"
27-
- runs-on: ubuntu-22.04
2825
install-output-ext: "tar.gz"
29-
runs-on: ${{matrix.runs-on}}
26+
runs-on: ${{ matrix.runs-on }}
3027
steps:
31-
- name: Prepare Build Environment
32-
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH
33-
3428
- name: Checkout binutils
3529
uses: actions/checkout@v4
3630
with:
37-
path: ${{github.workspace}}
3831
submodules: recursive
39-
persist-credentials: false
4032

41-
- name: Build binutils
33+
- name: "[Linux] Install dependencies"
34+
if: runner.os == 'Linux'
35+
run: sudo apt-get update && sudo apt-get install -y texinfo
36+
37+
- name: "[macOS] Install dependencies"
38+
if: runner.os == 'macOS'
39+
run: brew install texinfo
40+
41+
- name: Setup MSYS2
42+
if: runner.os == 'Windows'
43+
uses: msys2/setup-msys2@v2
44+
with:
45+
msystem: MINGW64
46+
update: false
47+
cache: true
48+
install: >-
49+
mingw-w64-x86_64-toolchain
50+
mingw-w64-x86_64-autotools
51+
mingw-w64-x86_64-gettext-tools
52+
make
53+
texinfo
54+
bison
55+
flex
56+
57+
- name: "[Linux] Build binutils"
58+
if: runner.os == 'Linux'
59+
shell: bash
4260
run: |
43-
cd ${{github.workspace}}
44-
CC=gcc ./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --prefix=${{github.workspace}}/binutils-install
61+
./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --prefix="$GITHUB_WORKSPACE/binutils-install"
4562
make -j4 && make install -j4
4663
47-
- name: "[Linux] Tar install"
48-
if: runner.os == 'Linux'
64+
- name: "[macOS] Build binutils"
65+
if: runner.os == 'macOS'
66+
shell: bash
4967
run: |
50-
tar -C ${{github.workspace}} -czvf binutils-${{runner.os}}.${{matrix.install-output-ext}} binutils-install
51-
- name: "[Windows] Zip install"
68+
./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --with-system-zlib --prefix="$GITHUB_WORKSPACE/binutils-install"
69+
make -j4 && make install -j4
70+
71+
- name: "[Windows] Build binutils"
5272
if: runner.os == 'Windows'
73+
shell: msys2 {0}
5374
run: |
54-
cd ${{github.workspace}} && 7z a -tzip binutils-${{runner.os}}.${{matrix.install-output-ext}} binutils-install
75+
PREFIX=$(cygpath -m "$GITHUB_WORKSPACE/binutils-install")
76+
./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --prefix="$PREFIX"
77+
make -j4 MAKEINFO=true && make install -j4 MAKEINFO=true
78+
79+
- name: "[Unix] Tar install"
80+
if: runner.os != 'Windows'
81+
shell: bash
82+
run: |
83+
tar -czvf binutils-${{ runner.os }}.${{ matrix.install-output-ext }} binutils-install
84+
85+
- name: "[Windows] Tar install"
86+
if: runner.os == 'Windows'
87+
shell: msys2 {0}
88+
run: |
89+
tar -czvf binutils-${{ runner.os }}.${{ matrix.install-output-ext }} binutils-install
5590
5691
- name: Upload binutils
5792
uses: actions/upload-artifact@v4
5893
with:
59-
name: binutils-${{runner.os}}${{matrix.arch-suffix}}
60-
path: binutils-${{runner.os}}${{matrix.arch-suffix}}.${{matrix.install-output-ext}}
61-
94+
name: binutils-${{ runner.os }}${{ matrix.arch-suffix }}
95+
path: binutils-${{ runner.os }}.${{ matrix.install-output-ext }}

0 commit comments

Comments
 (0)