name: build from source on: push: branches: - master - dev paths: - .github/workflows/build.yaml - build/* pull_request: paths: - .github/workflows/build.yaml - build/* env: DOCKER_REPO: shenxn/protonmail-bridge DOCKER_REPO_DEV: ghcr.io/shenxn/protonmail-bridge-dev PLATFORMS: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/riscv64 jobs: build-binary: runs-on: ubuntu-22.04 strategy: matrix: arch: ["amd64", "arm64", "arm", "riscv64"] fail-fast: true steps: - name: Checkout uses: actions/checkout@v3 with: path: main - name: Set version id: version run: echo "version=`cat main/build/VERSION`" >> $GITHUB_OUTPUT - name: Checkout proton bridge repo uses: actions/checkout@v3 with: repository: ProtonMail/proton-bridge ref: v${{ steps.version.outputs.version }} path: proton-bridge - name: Set up golang uses: actions/setup-go@v3 with: go-version: 1.18 check-latest: true - name: Install dependencies run: sudo apt-get install -y --no-install-recommends build-essential libsecret-1-dev - name: Download go dep if: ${{ matrix.arch == 'arm' }} working-directory: proton-bridge # Build once to download deps. # This step is expected to fail. run: make build-nogui || true env: GOARCH: ${{ matrix.arch }} - name: Patch for 32 bit arch if: ${{ matrix.arch == 'arm' }} # For 32bit architectures, there was a overflow error on the parser # This is a workaround for this problem found at: # https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106 run: find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<