Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Create a downloads mirror #6

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 30 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,31 +104,45 @@ jobs:
- name: Build
shell: bash
run: |
iceccd --no-remote -s ciserver.ci -d
WORKDIR=$(pwd)
source poky/oe-init-build-env
export CI_MIRROR="http://cicache.ci:8000/cimirror/${{ github.repository }}/downloads"
export CACHE_DIR="$WORKDIR/buildcache"
export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS CACHE_DIR"
export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS CACHE_DIR CI_MIRROR"
echo "require conf/includes/ci.conf" >> conf/local.conf
cat conf/local.conf
bitbake -c cleanall scu-bl scu-fw u-boot u-boot-tfa-image trusted-firmware-a-hailo
bitbake core-image-minimal --runall=fetch
bitbake core-image-minimal
# bitbake core-image-minimal

- name: Update cache on the server
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: tespkg/actions-cache/save@v1
# - name: Update cache on the server
# # if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
# uses: tespkg/actions-cache/save@v1
# with:
# endpoint: ciserver.ci
# port: 9000
# insecure: true
# accessKey: ${{ secrets.CI_CACHE_MINIO_ACCESS }}
# secretKey: ${{ secrets.CI_CACHE_MINIO_SECRET }}
# bucket: cicache
# use-fallback: false
# key: ${{ github.repository }}
# path: |
# buildcache/sstate-cache
# buildcache/ccache
# buildcache/downloads

- name: Update download mirrors
# if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: keithweaver/aws-s3-github-action@v1.0.0
with:
endpoint: ciserver.ci
port: 9000
insecure: true
accessKey: ${{ secrets.CI_CACHE_MINIO_ACCESS }}
secretKey: ${{ secrets.CI_CACHE_MINIO_SECRET }}
bucket: cicache
use-fallback: false
key: ${{ github.repository }}
path: |
buildcache
command: sync
source: buildcache/downloads
destination: s3://cimirror/${{ github.repository }}
aws_access_key_id: ${{ secrets.CI_CACHE_MINIO_ACCESS }}
aws_secret_access_key: ${{ secrets.CI_CACHE_MINIO_SECRET }}
aws_region: us-east-1
flags: "--endpoint-url http://ciserver.ci:9000"

- name: Copy deploy artifacts
shell: bash
Expand Down
9 changes: 4 additions & 5 deletions conf/includes/ci.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CACHE_DIR ??= "${TOPDIR}"
CI_MIRROR ??= ""

BB_GENERATE_MIRROR_TARBALLS = "1"
BB_GIT_SHALLOW ?= "1"
Expand All @@ -9,11 +10,9 @@ SSTATE_DIR = "${CACHE_DIR}/sstate-cache"
CCACHE_TOP_DIR = "${CACHE_DIR}/ccache"

INHERIT += "ccache"

ICECC_PARALLEL_MAKE = "-j 64"
INHERIT += "icecc"

INHERIT += "rm_work"

ICECC_RECIPE_DISABLE += "libgsthailo"
SOURCE_MIRROR_URL ?= "${CI_MIRROR}"
INHERIT += "own-mirrors"

CCACHE_DISABLE:pn-libgsthailo = "1"