CI: add support for getting ccache cache from S3
[openwrt/staging/pepe2k.git] / .github / workflows / packages.yml
1 name: Build all core packages
2
3 on:
4 pull_request:
5 paths:
6 - '.github/workflows/build.yml'
7 - '.github/workflows/packages.yml'
8 - 'config/**'
9 - 'include/**'
10 - 'package/**'
11 - 'target/linux/generic/**'
12 - 'toolchain/**'
13 push:
14 paths:
15 - '.github/workflows/build.yml'
16 - '.github/workflows/packages.yml'
17 - 'config/**'
18 - 'include/**'
19 - 'package/**'
20 - 'target/linux/generic/**'
21 - 'toolchain/**'
22 branches-ignore:
23 - master
24
25 permissions:
26 contents: read
27
28 concurrency:
29 group: ${{ github.workflow }}-${{ github.ref }}
30 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
31
32 jobs:
33 build:
34 name: Build Packages with external toolchain
35 permissions:
36 contents: read
37 packages: read
38 actions: write
39 strategy:
40 fail-fast: False
41 matrix:
42 include:
43 - target: malta
44 subtarget: be
45 - target: x86
46 subtarget: 64
47 uses: ./.github/workflows/build.yml
48 with:
49 container_name: toolchain
50 target: ${{ matrix.target }}
51 subtarget: ${{ matrix.subtarget }}
52 build_kernel: true
53 build_all_kmods: true
54 build_all_modules: true
55 build_full: true
56 ccache_type: packages
57 upload_ccache_cache: ${{ github.repository_owner == 'openwrt' }}
58
59 upload-ccache-cache-in-s3:
60 if: github.event_name == 'push' && github.repository_owner == 'openwrt'
61 name: Upload ccache cache to s3
62 needs: build
63 strategy:
64 fail-fast: False
65 matrix:
66 include:
67 - target: malta
68 subtarget: be
69 - target: x86
70 subtarget: 64
71 secrets:
72 s3_access_key: ${{ secrets.GCS_S3_ACCESS_KEY }}
73 s3_secret_key: ${{ secrets.GCS_S3_SECRET_KEY }}
74 uses: ./.github/workflows/upload-file-s3.yml
75 with:
76 endpoint: https://storage.googleapis.com
77 bucket: openwrt-ci-cache
78 download_id: ${{ matrix.target }}-${{ matrix.subtarget }}-ccache-cache
79 filename: ccache-packages-${{ matrix.target }}-${{ matrix.subtarget }}.tar
80