Universal install plugin script #670
Workflow file for this run
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - README.md | |
| - docs/** | |
| pull_request: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - README.md | |
| - docs/** | |
| jobs: | |
| build_linux: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| DOCKER_IMAGE: ubuntu-14.04 | |
| BUILD_TYPE: Release | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build docker image | |
| run: ci/docker/build_image.sh | |
| - name: Install apps | |
| run: ci/linux_install.sh | |
| - name: Build | |
| run: ci/linux_build.sh | |
| - name: Test | |
| run: ci/linux_test.sh | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages-linux | |
| if-no-files-found: error | |
| path: | | |
| ci_build/${{ env.BUILD_TYPE }}/*.deb | |
| ci_build/${{ env.BUILD_TYPE }}/*.tar.xz | |
| build_macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-26 | |
| - macos-15-intel | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| BUILD_TYPE: Release | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Increase yarn timeout | |
| run: yarn config set network-timeout 300000 | |
| - name: Install apps | |
| run: ci/macos_install.sh | |
| - name: Build | |
| run: ci/macos_build.sh | |
| - name: Test | |
| run: ci/macos_test.sh | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages-${{ matrix.os }} | |
| if-no-files-found: error | |
| path: | | |
| ci_build/${{ env.BUILD_TYPE }}/*.fb2k-component | |
| ci_build/${{ env.BUILD_TYPE }}/*.zip | |
| build_windows: | |
| runs-on: windows-2022 | |
| defaults: | |
| run: | |
| shell: cmd | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: | |
| - Win32 | |
| - x64 | |
| env: | |
| BUILD_TYPE: Release | |
| BUILD_ARCH: ${{ matrix.arch }} | |
| steps: | |
| - name: Set git to use LF | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: Install apps | |
| run: cmd /c ci\windows_install.cmd | |
| - name: Build | |
| run: cmd /c ci\windows_build.cmd | |
| - name: Test | |
| run: cmd /c ci\windows_test.cmd | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'packages-windows-${{ matrix.arch }}' | |
| if-no-files-found: error | |
| path: 'ci_build\${{ env.BUILD_TYPE }}\*.fb2k-component' | |
| build_universal_fb2k_package: | |
| runs-on: macos-26 | |
| needs: | |
| - build_macos | |
| - build_windows | |
| steps: | |
| - name: Download Windows packages | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: packages-windows-* | |
| merge-multiple: true | |
| path: input | |
| - name: Download macOS packages | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: packages-macos-* | |
| merge-multiple: true | |
| path: input | |
| - name: Build package | |
| run: | | |
| pkg_ext=fb2k-component | |
| pkg_windows_x32=$(pwd)/input/*-windows-x86.$pkg_ext | |
| pkg_windows_x64=$(pwd)/input/*-windows-x86_64.$pkg_ext | |
| pkg_mac_arm=$(pwd)/input/*-macos-arm64.$pkg_ext | |
| pkg_mac_x64=$(pwd)/input/*-macos-x86_64.$pkg_ext | |
| pkg_universal=$(pwd)/output/$(basename $pkg_mac_arm -macos-arm64.$pkg_ext).$pkg_ext | |
| mac_binary=mac/foo_beefweb.component/Contents/MacOS/foo_beefweb | |
| mkdir -p work/lipo work/pkg output | |
| unzip -d work/lipo/arm -j $pkg_mac_arm $mac_binary | |
| unzip -d work/lipo/x64 -j $pkg_mac_x64 $mac_binary | |
| unzip -d work/pkg $pkg_mac_arm | |
| unzip -d work/pkg $pkg_windows_x32 | |
| unzip -d work/pkg $pkg_windows_x64 x64/foo_beefweb.dll | |
| lipo -create work/lipo/arm/foo_beefweb work/lipo/x64/foo_beefweb \ | |
| -output work/pkg/$mac_binary | |
| lipo -info work/pkg/$mac_binary | |
| (cd work/pkg && zip -r -9 $pkg_universal *) | |
| - name: Upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages-fb2k-universal | |
| if-no-files-found: error | |
| path: output/*.fb2k-component |