Skip to content

Makefile fixed for M1 Macs #4321

Makefile fixed for M1 Macs

Makefile fixed for M1 Macs #4321

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
gomod:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- run: make go-mod-tidy
- run: make go-mod-download
- run: tar -cvf ./src.tar.gz ./ # preserve file permissions
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: src
path: ./src.tar.gz
lint:
runs-on: ubuntu-20.04
needs: gomod
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: src
- run: tar -xvf ./src.tar.gz
- run: make golint
test:
runs-on: ubuntu-20.04
needs: [gomod, lint]
strategy:
fail-fast: false
matrix:
testSuite: [test, integration-test, helm-test]
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: src
- uses: helm/[email protected]
- run: tar -xvf ./src.tar.gz
- run: |
make install-csi-hostpath-driver
make install-minio
if: matrix.testSuite == 'integration-test' || matrix.testSuite == 'helm-test'
# A test (CRDSuite) that runs as part of `make test` requies atleast one CRD to
# be present on the cluster. That's why we are only installing csi-hostpath-driver
# before running `make test`, to create some CRDs on the cluster.
- run: |
make install-csi-hostpath-driver
make install-minio
if: matrix.testSuite == 'test'
- run: make ${{ matrix.testSuite }}
build:
runs-on: ubuntu-20.04
needs: [gomod, lint, test]
strategy:
matrix:
bin: [controller, kanctl, kando]
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: src
- run: tar -xvf ./src.tar.gz
- run: make build BIN=${{ matrix.bin }} GOBORING=true
docs:
runs-on: ubuntu-20.04
needs: gomod
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: src
- run: tar -xvf ./src.tar.gz
- run: make docs
release:
runs-on: ubuntu-20.04
needs: [test, build]
if: github.ref_name == 'master' || startsWith(github.ref, 'refs/tags')
permissions:
packages: write
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: src
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: sudo rm -rf /usr/share/dotnet
- run: sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- run: tar -xvf ./src.tar.gz
- run: make release-snapshot
- run: ./build/push_images.sh