Skip to content

Commit

Permalink
feat(ci): optimize builds (no more extra env setup) (#526)
Browse files Browse the repository at this point in the history
* feat(ci): optimize builds (no more extra env setup)

* fix: no 'push' check (blunder??)
  • Loading branch information
madonuko authored Jun 13, 2023
1 parent ffb8736 commit 9231c9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,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:
Expand All @@ -52,21 +51,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 != 'push'
with:
name: "${{ matrix.pkg.pkg }}"
mockConfig: terra-${{ 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 == 'push'
with:
name: "${{ matrix.pkg.pkg }}"
mockConfig: terra-${{ 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
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: terra-${{ 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
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/json-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: terra-${{ 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
Expand Down

0 comments on commit 9231c9b

Please sign in to comment.