[ci] disable shared libraries for windows #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 --disable-gdb --disable-sim --disable-readline --prefix="$GITHUB_WORKSPACE/binutils-install" | |
| make -j4 && make install -j4 | |
| - name: "[macOS] Build binutils" | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| ./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --with-system-zlib --prefix="$GITHUB_WORKSPACE/binutils-install" | |
| make -j4 && make install -j4 | |
| - name: "[Windows] Build binutils" | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| PREFIX=$(cygpath -m "$GITHUB_WORKSPACE/binutils-install") | |
| ./configure --target=z80-none-elf --disable-gdb --disable-sim --disable-readline --disable-nls --disable-shared --enable-static --prefix="$PREFIX" | |
| make -j4 LDFLAGS="-all-static" MAKEINFO=true && make install -j4 MAKEINFO=true | |
| - name: "[Unix] Tar install" | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| tar -czvf binutils-${{ runner.os }}.${{ matrix.install-output-ext }} binutils-install | |
| - name: "[Windows] Tar install" | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| tar -czvf binutils-${{ runner.os }}.${{ matrix.install-output-ext }} binutils-install | |
| - 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: Extract and Zip Ubuntu Artifacts | |
| run: | | |
| cd ubuntu | |
| tar -xzvf binutils-Linux.tar.gz | |
| mv binutils-install binutils | |
| zip -r9 ../binutils_ubuntu_nightly.zip binutils | |
| - name: Extract and Zip macOS Intel Artifacts | |
| run: | | |
| cd macos-intel | |
| tar -xzvf binutils-macOS.tar.gz | |
| mv binutils-install binutils | |
| zip -r9 ../binutils_macos_intel_nightly.zip binutils | |
| - name: Extract and Zip macOS ARM Artifacts | |
| run: | | |
| cd macos-arm | |
| tar -xzvf binutils-macOS.tar.gz | |
| mv binutils-install binutils | |
| zip -r9 ../binutils_macos_arm_nightly.zip binutils | |
| - name: Extract and Zip Windows Artifacts | |
| run: | | |
| cd windows | |
| tar -xzvf binutils-Windows.tar.gz | |
| mv binutils-install binutils | |
| 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.zip | |
| binutils_macos_intel_nightly.zip | |
| binutils_macos_arm_nightly.zip | |
| binutils_windows_nightly.zip |