check use of cache [do not review or merge] #383
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# CI workflows for MTDA | |
# --------------------------------------------------------------------------- | |
# | |
# This software is a part of MTDA. | |
# Copyright (C) 2023 Siemens Digital Industries Software | |
# | |
# --------------------------------------------------------------------------- | |
# SPDX-License-Identifier: MIT | |
# --------------------------------------------------------------------------- | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
types: [ labeled ] | |
jobs: | |
lint: | |
name: Check code for issues | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: tox | |
run: | | |
pip3 install --user tox | |
tox -s | |
kas-ci: | |
name: Build kas/ci targets | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Free Disk Space | |
uses: ./.github/workflows/free-disk-space | |
- name: Cache downloads and sstate | |
uses: actions/cache@v3 | |
with: | |
key: ${{ hashFiles('debian/changelog') }} | |
path: | | |
build/downloads | |
build/sstate-cache | |
- name: Build Fast CI targets | |
if: github.ref != 'refs/heads/master' | |
run: | | |
pwd | |
ls | |
mkdir -p build | |
du -sh build/* | |
./kas-container build kas/ci/fast.yml | |
- name: Build Full CI targets | |
if: github.ref == 'refs/heads/master' | |
run: | | |
./kas-container build kas/ci/full.yml | |
- name: Upload NanoPI images | |
uses: actions/upload-artifact@v2 | |
if: github.ref == 'refs/heads/master' | |
with: | |
name: mtda-nanopi-images | |
path: | | |
build/tmp/deploy/images/nanopi-*/mtda-image-mtda-*-nanopi-*.wic | |
build/tmp/deploy/images/nanopi-*/mtda-image-mtda-*-nanopi-*.wic.bmap | |
- name: Upload BeagleBone Black images | |
uses: actions/upload-artifact@v2 | |
if: github.ref == 'refs/heads/master' | |
with: | |
name: mtda-bbb-images | |
path: | | |
build/tmp/deploy/images/beaglebone-*/mtda-image-mtda-*-beaglebone-*.wic | |
build/tmp/deploy/images/beaglebone-*/mtda-image-mtda-*-beaglebone-*.wic.bmap | |
- name: Publish Debian packages to Gemfury | |
env: | |
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }} | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-tc') && !contains(github.ref, '-rc') | |
run: | | |
find build/tmp/deploy/isar-apt/mtda-bookworm-* -name '*.deb' -print | while read p; do | |
curl -F package=@${p} https://{$GEMFURY_PUSH_TOKEN}@push.fury.io/mtda/; | |
done | |
- name: Import GPG key | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-tc') && !contains(github.ref, '-rc') | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v4 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Upload source packages to PPA | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-tc') && !contains(github.ref, '-rc') | |
run: | | |
sudo apt install -y devscripts dh-python equivs | |
./scripts/build-using-ppa ${PWD}/build jammy |