From 3e20e6f58dd1be6e9a22322baef22f15a4949b41 Mon Sep 17 00:00:00 2001 From: tanlang Date: Mon, 27 Feb 2023 06:18:52 +0000 Subject: [PATCH 1/2] fix: rm upgrade in action --- .github/workflows/baisc_checks.yml | 5 +++-- .github/workflows/common_build_upload.yml | 4 +++- .github/workflows/common_go.yml | 3 ++- .github/workflows/test.yml | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/baisc_checks.yml b/.github/workflows/baisc_checks.yml index 8890d2d456..2b8fdcd236 100644 --- a/.github/workflows/baisc_checks.yml +++ b/.github/workflows/baisc_checks.yml @@ -19,11 +19,12 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18 + cache: true - name: install deps run: | sudo apt-get update - sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y + sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y - name: Build env: @@ -48,4 +49,4 @@ jobs: - name: Detect changes run: | git status --porcelain - test -z "$(git status --porcelain)" \ No newline at end of file + test -z "$(git status --porcelain)" diff --git a/.github/workflows/common_build_upload.yml b/.github/workflows/common_build_upload.yml index 557d75f8a4..995c99e7b0 100644 --- a/.github/workflows/common_build_upload.yml +++ b/.github/workflows/common_build_upload.yml @@ -112,6 +112,7 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18 + cache: true - name: install deps if: ${{ !inputs.has_ffi }} @@ -123,7 +124,7 @@ jobs: if: ${{ inputs.has_ffi }} run: | sudo apt-get update - sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y + sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y - name: Build run: | @@ -248,6 +249,7 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18 + cache: true - name: install more deps if: ${{ inputs.has_ffi }} diff --git a/.github/workflows/common_go.yml b/.github/workflows/common_go.yml index 33a88bc86a..d0c5e38606 100644 --- a/.github/workflows/common_go.yml +++ b/.github/workflows/common_go.yml @@ -23,6 +23,7 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18 + cache: true - name: vars id: vars @@ -35,7 +36,7 @@ jobs: echo vars.repo_name = ${{steps.vars.outputs.repo_name}} - name: install default deps - run: sudo apt-get -o Acquire::Retries=3 update && sudo apt-get -o Acquire::Retries=3 install make ftp git bzr curl wget -y && sudo apt upgrade -y + run: sudo apt-get -o Acquire::Retries=3 update && sudo apt-get -o Acquire::Retries=3 install make ftp git bzr curl wget -y - name: install deps if: ${{ inputs.has_ffi }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7bb0f48b93..99106e64a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,11 +19,12 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18 + cache: true - name: install deps run: | sudo apt-get update - sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y + sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y - name: install statediff globally run: | From 69fcb773b7906ed7a1fcb208dde8f29c18e4427a Mon Sep 17 00:00:00 2001 From: tanlang Date: Mon, 27 Feb 2023 06:28:07 +0000 Subject: [PATCH 2/2] feat: use cache for go mod in action --- .github/workflows/baisc_checks.yml | 2 +- .github/workflows/common_build_upload.yml | 4 ++-- .github/workflows/common_go.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/baisc_checks.yml b/.github/workflows/baisc_checks.yml index 2b8fdcd236..5f613644e0 100644 --- a/.github/workflows/baisc_checks.yml +++ b/.github/workflows/baisc_checks.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 cache: true diff --git a/.github/workflows/common_build_upload.yml b/.github/workflows/common_build_upload.yml index 995c99e7b0..62891c4c2e 100644 --- a/.github/workflows/common_build_upload.yml +++ b/.github/workflows/common_build_upload.yml @@ -109,7 +109,7 @@ jobs: echo ftp_url = ftp://${{secrets.FTP_HOST}}/${{steps.vars.outputs.repo_name}}/${{steps.vars.outputs.artifact_name}} - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 cache: true @@ -246,7 +246,7 @@ jobs: echo vars.artifact_name = ${{steps.vars.outputs.artifact_name}} - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 cache: true diff --git a/.github/workflows/common_go.yml b/.github/workflows/common_go.yml index d0c5e38606..463ed43a08 100644 --- a/.github/workflows/common_go.yml +++ b/.github/workflows/common_go.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99106e64a7..705f91a006 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 cache: true