From 991c7bf08ffee399fe645456f773bd839be6d2a7 Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 15 Jun 2023 03:13:27 +0800 Subject: [PATCH] feat(ci): optimizations on build time (#546) --- .github/workflows/autobuild.yml | 21 +++++---------------- .github/workflows/build.yml | 10 ++++------ .github/workflows/json-build.yml | 10 ++++------ 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 886ed45d42..eb5349d3f0 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -31,8 +31,7 @@ jobs: fetch-depth: 0 - name: Generate build matrix id: generate_build_matrix - run: | - anda ci >> $GITHUB_OUTPUT + run: anda ci >> $GITHUB_OUTPUT build: needs: manifest strategy: @@ -49,21 +48,11 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set up git repository + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - uses: terrapkg/anda-build@main - if: github.event_name == 'pull_request' - with: - name: "${{ matrix.pkg.pkg }}" - mockConfig: anda-${{ matrix.version }}-${{ matrix.pkg.arch }} - andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra${{ matrix.version }}.repo - - - uses: terrapkg/anda-build@main - if: github.event_name != 'pull_request' - with: - name: "${{ matrix.pkg.pkg }}" - mockConfig: anda-${{ matrix.version }}-${{ matrix.pkg.arch }} - extraArgs: -D "sccache_bucket ${{secrets.SCCACHE_BUCKET}}" -D "sccache_endpoint ${{secrets.SCCACHE_ENDPOINT}}" -D "sccache_secret ${{secrets.SCCACHE_SECRET}}" -D "sccache_accesskey ${{secrets.SCCACHE_ACCESSKEY}}" - andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra${{ matrix.version }}.repo + - name: Build with Anda + run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} - name: Generating artifact name id: art diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18cab04144..1cebb9e748 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,13 +33,11 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set up git repository + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - uses: terrapkg/anda-build@main - with: - name: "${{ matrix.pkg }}pkg" - mockConfig: anda-${{ matrix.version }}-${{ matrix.arch }} - extraArgs: -D "sccache_bucket ${{secrets.SCCACHE_BUCKET}}" -D "sccache_endpoint ${{secrets.SCCACHE_ENDPOINT}}" -D "sccache_secret ${{secrets.SCCACHE_SECRET}}" -D "sccache_accesskey ${{secrets.SCCACHE_ACCESSKEY}}" - andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo + - name: Build with Anda + run: anda build ${{ matrix.pkg }}pkg --package rpm -c terra-${{ matrix.version }}-${{ matrix.arch }} - name: Generating artifact name id: art diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 25ab07fc6c..bd19dfb531 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -22,13 +22,11 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set up git repository + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - uses: terrapkg/anda-build@main - with: - name: "${{ matrix.pkg.pkg }}" - mockConfig: anda-${{ matrix.version }}-${{ matrix.pkg.arch }} - extraArgs: -D "sccache_bucket ${{secrets.SCCACHE_BUCKET}}" -D "sccache_endpoint ${{secrets.SCCACHE_ENDPOINT}}" -D "sccache_secret ${{secrets.SCCACHE_SECRET}}" -D "sccache_accesskey ${{secrets.SCCACHE_ACCESSKEY}}" - andaRepo: https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo + - name: Build with Anda + run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} - name: Generating artifact name id: art