@@ -88,20 +88,16 @@ jobs:
8888 ca-certificates \
8989 && rm -rf /var/lib/apt/lists/*
9090
91- # Build and install RTL-SDR - Try with threads explicitly disabled first as workaround
91+ # Build and install RTL-SDR
9292 WORKDIR /tmp/build
9393 RUN git clone https://gitea.osmocom.org/sdr/rtl-sdr.git --depth 1 && \
9494 cd rtl-sdr && \
9595 mkdir build && cd build && \
96- ( cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
96+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
9797 -DINSTALL_UDEV_RULES=OFF \
9898 -DDETACH_KERNEL_DRIVER=ON \
9999 -DCMAKE_THREAD_PREFER_PTHREAD=ON \
100- -DTHREADS_PREFER_PTHREAD_FLAG=ON || \
101- (echo "=== CMAKE FAILED - Dumping error logs ===" && \
102- echo "=== CMakeError.log ===" && cat CMakeFiles/CMakeError.log && \
103- echo "=== CMakeOutput.log ===" && cat CMakeFiles/CMakeOutput.log && \
104- exit 1)) && \
100+ -DTHREADS_PREFER_PTHREAD_FLAG=ON && \
105101 make -j$(nproc) && \
106102 make install && \
107103 ldconfig
@@ -130,6 +126,15 @@ jobs:
130126 WORKDIR /workspace
131127 EOF
132128
129+ - name : Set platform based on distro
130+ id : platforms
131+ run : |
132+ if [ "${{ matrix.distro }}" = "ubuntu" ]; then
133+ echo "platforms=linux/amd64" >> $GITHUB_OUTPUT
134+ else
135+ echo "platforms=linux/amd64,linux/arm64,linux/arm/v7" >> $GITHUB_OUTPUT
136+ fi
137+
133138 - name : Build and push builder image
134139 uses : docker/build-push-action@v5
135140 with :
@@ -138,7 +143,7 @@ jobs:
138143 build-args : |
139144 DISTRO=${{ matrix.distro }}
140145 CODENAME=${{ matrix.codename }}
141- platforms : linux/amd64,linux/arm64,linux/arm/v7
146+ platforms : ${{ steps.platforms.outputs.platforms }}
142147 push : true
143148 tags : |
144149 ghcr.io/${{ github.repository_owner }}/ais-catcher-builder:${{ matrix.distro }}-${{ matrix.codename }}
0 commit comments