don't parallelize, fail-empty, go version #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
jobs: | |
docker: | |
# temporarily suppress this job to work around rate limit | |
if: false | |
runs-on: buildjet-4vcpu-ubuntu-2204-arm | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v4 | |
with: | |
file: etc/packaging/32bit/Dockerfile | |
tags: ghcr.io/viamrobotics/viam-server:armv7 | |
pull: true | |
push: true | |
cache-from: type=registry,ref=ghcr.io/viamrobotics/viam-server:buildcache | |
cache-to: type=registry,ref=ghcr.io/viamrobotics/viam-server:buildcache | |
test: | |
# needs: [docker] | |
runs-on: buildjet-4vcpu-ubuntu-2204-arm | |
concurrency: '32bit-${{ github.ref }}' # to debug runs, DONOTMERGE (for prod speed) | |
strategy: | |
# fail-fast: false | |
matrix: | |
index: ['0', '1', '2', '3'] | |
permissions: | |
packages: read | |
steps: | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
- name: test | |
env: | |
GOFLAGS: -buildvcs=false -tags no_tflite,no_pigpio | |
CGO_ENABLED: '1' | |
run: docker run --rm -v $PWD/:/rdk ghcr.io/viamrobotics/viam-server:armv7 sh -c "go version && go list -json $GOFLAGS ./... | etc/splitter.py ${{ matrix.index }} --nbins 4 --command \"go test $GOFLAGS\" --fail-empty" | |
build: | |
needs: [test] | |
runs-on: buildjet-4vcpu-ubuntu-2204-arm | |
permissions: | |
packages: read | |
steps: | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
- name: build | |
run: docker run --rm -v $PWD/:/rdk ghcr.io/viamrobotics/viam-server:armv7 sh -c "git config --global --add safe.directory '*' && go build -v -tags no_pigpio,no_tflite ./web/cmd/server" | |
- name: show arch | |
run: file server | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: server | |
upload: | |
needs: [build] | |
if: github.ref_name == 'main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: rename | |
run: mv artifact/server viam-server-latest-armv7l | |
- name: Authorize GCP Upload | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
- name: upload | |
uses: google-github-actions/[email protected] | |
with: | |
headers: "cache-control: no-cache" | |
path: viam-server-latest-armv7l | |
destination: 'packages.viam.com/apps/viam-server/' | |
parent: false |