|
| 1 | +name: Win/Mac/Linux |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - binutils-2_45_1-cedev |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + matrix: |
| 13 | + runs-on: [ubuntu-22.04, macos-15-intel, macos-14, windows-latest] |
| 14 | + include: |
| 15 | + - nul: /dev/null |
| 16 | + - runs-on: macos-15-intel |
| 17 | + arch-suffix: "-intel" |
| 18 | + install-output-ext: "dmg" |
| 19 | + - runs-on: macos-14 |
| 20 | + arch-suffix: "-arm" |
| 21 | + install-output-ext: "dmg" |
| 22 | + - runs-on: windows-latest |
| 23 | + env: "env:" |
| 24 | + exe: .exe |
| 25 | + nul: nul |
| 26 | + install-output-ext: "zip" |
| 27 | + - runs-on: ubuntu-22.04 |
| 28 | + install-output-ext: "tar.gz" |
| 29 | + runs-on: ${{matrix.runs-on}} |
| 30 | + steps: |
| 31 | + - name: Prepare Build Environment |
| 32 | + run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH |
| 33 | + |
| 34 | + - name: Checkout binutils |
| 35 | + uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + path: ${{github.workspace}} |
| 38 | + submodules: recursive |
| 39 | + persist-credentials: false |
| 40 | + |
| 41 | + - name: Build binutils |
| 42 | + run: | |
| 43 | + cd ${{github.workspace}} |
| 44 | + CC=gcc ./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --prefix=${{github.workspace}}/binutils-install |
| 45 | + make -j4 && make install -j4 |
| 46 | +
|
| 47 | + - name: "[Linux] Tar install" |
| 48 | + if: runner.os == 'Linux' |
| 49 | + run: | |
| 50 | + tar -C ${{github.workspace}} -czvf binutils-${{runner.os}}.${{matrix.install-output-ext}} binutils-install |
| 51 | + - name: "[Windows] Zip install" |
| 52 | + if: runner.os == 'Windows' |
| 53 | + run: | |
| 54 | + cd ${{github.workspace}} && 7z a -tzip binutils-${{runner.os}}.${{matrix.install-output-ext}} binutils-install |
| 55 | +
|
| 56 | + - name: Upload binutils |
| 57 | + uses: actions/upload-artifact@v4 |
| 58 | + with: |
| 59 | + name: binutils-${{runner.os}}${{matrix.arch-suffix}} |
| 60 | + path: binutils-${{runner.os}}${{matrix.arch-suffix}}.${{matrix.install-output-ext}} |
| 61 | + |
0 commit comments