Skip to content

Commit

Permalink
remove caching
Browse files Browse the repository at this point in the history
Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
  • Loading branch information
ludfjig committed Aug 30, 2023
1 parent beaac14 commit edfdbb9
Showing 1 changed file with 23 additions and 40 deletions.
63 changes: 23 additions & 40 deletions .github/workflows/porter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,10 @@ on:
branches:
- main
env:
GOCACHE: "${{ github.workspace }}/.cache/go-build/"
GOCACHE_KEY: v3 | go-build | "${{ runner.os }}" | go.sum
GOCACHE_RESTOREKEYS: |
v3 | go-build | "${{ runner.os }}"
v3 | go-build | "${{ runner.os }}" | go.sum
GOMODCACHE: "/home/vsts/go/pkg/mod"
GOMODCACHE_KEY: v4 | go-pkg | "${{ runner.os }}" | go.sum
GOMODCACHE_RESTOREKEYS: |
v4 | go-pkg | "${{ runner.os }}"
v4 | go-pkg | "${{ runner.os }}" | go.sum
GOVERSION: 1.20.7
GOXCACHE_KEY: v3 | go-xbuild | "${{ runner.os }}" | go.sum
GOXCACHE_RESTOREKEYS: |
v3 | go-xbuild | "${{ runner.os }}"
v3 | go-xbuild | "${{ runner.os }}" | go.sum

jobs:
Setup-pr_type:
PR_type:
name: Determine PR Type
runs-on: ubuntu-latest
steps:
Expand All @@ -30,10 +17,11 @@ jobs:
id: BUILD
run: "./build/doc-only-build.sh"
shell: bash
Validate-build:

Build:
name: Native Compile
needs:
- Setup-pr_type
- PR_type
runs-on: ubuntu-latest
if: success() && needs.Setup-pr_type.outputs['pr_type.BUILD.DOCS_ONLY'] == 'false'
steps:
Expand All @@ -53,10 +41,11 @@ jobs:
with:
name: build-bin
path: "${{ github.workspace }}/bin"
Validate-xbuild:

XBuild:
name: Cross Compile
needs:
- Setup-pr_type
- PR_type
runs-on: ubuntu-latest
if: success() && needs.Setup-pr_type.outputs['pr_type.BUILD.DOCS_ONLY'] == 'false'
steps:
Expand All @@ -76,10 +65,11 @@ jobs:
with:
name: xbuild-bin
path: "${{ github.workspace }}/bin"
Validate-unit_test:

Unit_test:
name: Unit Test
needs:
- Setup-pr_type
- PR_type
runs-on: ubuntu-latest
if: success() && needs.Setup-pr_type.outputs['pr_type.BUILD.DOCS_ONLY'] == 'false'
steps:
Expand All @@ -94,10 +84,11 @@ jobs:
- name: Unit Test
run: mage TestUnit
shell: bash
Validate-VetLint:

VetLint:
name: Vet and Lint
needs:
- Setup-pr_type
- PR_type
runs-on: ubuntu-latest
if: success() && needs.Setup-pr_type.outputs['pr_type.BUILD.DOCS_ONLY'] == 'false'
steps:
Expand All @@ -115,10 +106,11 @@ jobs:
- name: Lint
run: mage Lint
shell: bash
Validate-build_docker:

Build-docker-images:
needs:
- Validate-xbuild
- Setup-pr_type
- PR_type
- XBuild
runs-on: ubuntu-latest
if: success() && needs.Setup-pr_type.outputs['pr_type.BUILD.DOCS_ONLY'] == 'false'
steps:
Expand All @@ -137,20 +129,14 @@ jobs:
run: go run mage.go ConfigureAgent UseXBuildBinaries
- name: Build Docker Images
run: mage BuildImages
Validate-smoke_test:

Smoke-test:
name: Run smoke tests on
needs:
- Validate-xbuild
- Setup-pr_type
runs-on:
- self-hosted
- "${{ matrix.vmImage }}"
- PR_type
- XBuild
runs-on: ubuntu-latest
if: success() && needs.Setup-pr_type.outputs['pr_type.BUILD.DOCS_ONLY'] == 'false'
strategy:
matrix:
include:
- poolName: Azure Pipelines
vmImage: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3.5.0
Expand All @@ -163,9 +149,6 @@ jobs:
with:
go-version: "${{ env.GOVERSION }}" # The Go version to download (if necessary) and use.
- run: go version
- name: Windows Cache Prep
if: env.poolName == 'windows'
run: attrib -r ${{ env.GOMODCACHE }}/*.* /s
- name: Configure Agent
run: go run mage.go ConfigureAgent UseXBuildBinaries
- name: Run Smoke Tests
Expand Down

0 comments on commit edfdbb9

Please sign in to comment.