name: TinyGo Build on: push: branches: [ "tinygo" ] pull_request: branches: [ "tinygo" ] jobs: tinygo-build: permissions: contents: read strategy: matrix: include: - name: tinygo-default target: "" output: reticulum-go-tinygo make_target: tinygo-build - name: tinygo-wasm target: wasm output: reticulum-go.wasm make_target: tinygo-wasm runs-on: ubuntu-latest outputs: build_complete: ${{ steps.build_step.outcome == 'success' }} steps: - name: Checkout code uses: https://git.quad4.io/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Set up Go uses: https://git.quad4.io/actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 with: go-version: '1.24' - name: Install TinyGo run: | wget https://github.com/tinygo-org/tinygo/releases/download/v0.37.0/tinygo_0.37.0_amd64.deb sudo dpkg -i tinygo_0.37.0_amd64.deb - name: Build with TinyGo id: build_step run: | make ${{ matrix.make_target }} output_name="${{ matrix.output }}" if [ -f "bin/${output_name}" ]; then sha256sum "bin/${output_name}" | cut -d' ' -f1 > "bin/${output_name}.sha256" echo "Built: ${output_name}" echo "Generated checksum: bin/${output_name}.sha256" else echo "Build output not found: bin/${output_name}" ls -la bin/ exit 1 fi - name: Upload Artifact uses: https://git.quad4.io/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 with: name: ${{ matrix.name }} path: bin/${{ matrix.output }}*