|  | 
| 1 | 1 | name: Build Package | 
| 2 | 2 | on: | 
|  | 3 | +  pull_request: | 
| 3 | 4 |   push: | 
| 4 | 5 |     branches: | 
| 5 | 6 |       - main | 
|  | 
| 10 | 11 |     strategy: | 
| 11 | 12 |       fail-fast: false | 
| 12 | 13 |       matrix: | 
| 13 |  | -        os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] | 
|  | 14 | +        os: [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest] | 
| 14 | 15 |         include: | 
| 15 | 16 |           - os: ubuntu-latest | 
| 16 | 17 |             out-file: libtemporal_sdk_bridge.so | 
|  | 
| 25 | 26 |             # We use the Python manylinux image for glibc compatibility | 
| 26 | 27 |             container: quay.io/pypa/manylinux2014_aarch64 | 
| 27 | 28 |             protobuf-url: https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-aarch_64.zip | 
|  | 29 | +          - os: alpine-latest | 
|  | 30 | +            out-file: libtemporal_sdk_bridge.so | 
|  | 31 | +            out-prefix: linux-musl-x64 | 
|  | 32 | +            # Need Alpine container since GH runner doesn't have one | 
|  | 33 | +            container: mcr.microsoft.com/dotnet/sdk:8.0-alpine | 
|  | 34 | +            protobuf-url: https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip | 
|  | 35 | +            runsOn: ubuntu-latest | 
| 28 | 36 |           - os: macos-intel | 
| 29 | 37 |             out-file: libtemporal_sdk_bridge.dylib | 
| 30 | 38 |             out-prefix: osx-x64 | 
| @@ -68,14 +76,29 @@ jobs: | 
| 68 | 76 |         if: ${{ !matrix.container }} | 
| 69 | 77 |         run: cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release | 
| 70 | 78 | 
 | 
| 71 |  | -      - name: Build (Docker) | 
| 72 |  | -        if: ${{ matrix.container }} | 
|  | 79 | +      - name: Build (Docker non-Alpine) | 
|  | 80 | +        if: ${{ matrix.container && matrix.os != 'alpine-latest' }} | 
|  | 81 | +        run: | | 
|  | 82 | +          docker run --rm -v "$(pwd):/workspace" -w /workspace \ | 
|  | 83 | +            ${{ matrix.container }} \ | 
|  | 84 | +            sh -c ' \ | 
|  | 85 | +                curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y \ | 
|  | 86 | +             && . $HOME/.cargo/env \ | 
|  | 87 | +             && curl -LO ${{ matrix.protobuf-url }} \ | 
|  | 88 | +             && unzip protoc-*.zip -d /usr/local/protobuf \ | 
|  | 89 | +             && export PATH="$PATH:/usr/local/protobuf/bin" \ | 
|  | 90 | +             && cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \ | 
|  | 91 | +            ' | 
|  | 92 | +
 | 
|  | 93 | +      - name: Build (Docker Alpine) | 
|  | 94 | +        if: ${{ matrix.container && matrix.os == 'alpine-latest' }} | 
| 73 | 95 |         run: | | 
| 74 | 96 |           docker run --rm -v "$(pwd):/workspace" -w /workspace \ | 
| 75 | 97 |             ${{ matrix.container }} \ | 
| 76 | 98 |             sh -c ' \ | 
| 77 | 99 |                 curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y \ | 
| 78 | 100 |              && . $HOME/.cargo/env \ | 
|  | 101 | +             && apk add --no-cache build-base \ | 
| 79 | 102 |              && curl -LO ${{ matrix.protobuf-url }} \ | 
| 80 | 103 |              && unzip protoc-*.zip -d /usr/local/protobuf \ | 
| 81 | 104 |              && export PATH="$PATH:/usr/local/protobuf/bin" \ | 
| @@ -129,10 +152,12 @@ jobs: | 
| 129 | 152 |     strategy: | 
| 130 | 153 |       fail-fast: false | 
| 131 | 154 |       matrix: | 
| 132 |  | -        os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] | 
|  | 155 | +        os: [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest] | 
| 133 | 156 |         include: | 
| 134 | 157 |           - os: ubuntu-arm | 
| 135 | 158 |             runsOn: buildjet-4vcpu-ubuntu-2204-arm | 
|  | 159 | +          - os: alpine-latest | 
|  | 160 | +            container: mcr.microsoft.com/dotnet/sdk:8.0-alpine | 
| 136 | 161 |           - os: macos-intel | 
| 137 | 162 |             runsOn: macos-13 | 
| 138 | 163 |           - os: macos-arm | 
|  | 
0 commit comments