Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Support new Go version file format and remove deprecated connect-web #77

Support new Go version file format and remove deprecated connect-web

Support new Go version file format and remove deprecated connect-web #77

Workflow file for this run

name: "Continuous Build"
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-11
- macos-12
- ubuntu-22.04
- windows-2022
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.18.4'
cache: true
- id: cachedir
run: echo "cache-dir=$(go run mage.go cachedir)" >> $GITHUB_OUTPUT
shell: bash
- uses: "actions/cache@v3"
with:
path: ${{ steps.cachedir.outputs.cache-dir }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('internal/tools/specs.go') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}
- run: go run mage.go test
build_linux_arm64:
name: Build (linux-arm64)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.18.4'
cache: true
- uses: "actions/cache@v3"
with:
path: ~/.cache/org.curioswitch.protog
key: docker-linux-arm64-${{ hashFiles('internal/tools/specs.go') }}
restore-keys: |
docker-linux-arm64
- run: go test -c .
env:
CGO_ENABLED: 0
GOARCH: arm64
- name: Build test container
run: |
echo 'FROM gcr.io/distroless/cc-debian11:debug' >> Dockerfile.test
echo 'RUN ["ln", "-s", "/busybox/env", "/usr/bin/env"]' >> Dockerfile.test
echo 'COPY protog.test /protog.test' >> Dockerfile.test
echo 'COPY testdata /testdata' >> Dockerfile.test
echo 'ENTRYPOINT ["/protog.test"]' >> Dockerfile.test
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v3
with:
context: .
tags: protog:test
platforms: linux/arm64
file: Dockerfile.test
load: true
- run: docker run -t --rm --platform linux/arm64 --tmpfs /tmp -v ~/.cache/org.curioswitch.protog:/root/.cache/org.curioswitch.protog protog:test