mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-25 21:10:39 +00:00
feature: Configure caching (#599)
* Configure cache * use local build template * no dnf5??? * Revert "no dnf5???" This reverts commit f00e21ee6567fc96c515721389be8a515f779d4e. * add rpmfusion, use pkg name for cache too * let's try this
This commit is contained in:
@@ -54,8 +54,19 @@ jobs:
|
||||
- name: Set up git repository
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Build with Anda
|
||||
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}
|
||||
- name: Cache buildroot
|
||||
id: br-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /var/cache
|
||||
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.pkg.arch }}-${{ matrix.pkg.pkg }}
|
||||
|
||||
- name: Include custom build template instead of package default
|
||||
run: |
|
||||
cp -v anda/mock-configs/terra.tpl /etc/mock/templates/terra.tpl
|
||||
|
||||
- name: Build with Andaman
|
||||
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda/mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg
|
||||
|
||||
- name: Generating artifact name
|
||||
id: art
|
||||
|
||||
@@ -36,8 +36,15 @@ jobs:
|
||||
- name: Set up git repository
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Build with Anda
|
||||
run: anda build ${{ matrix.pkg }}pkg --package rpm -c terra-${{ matrix.version }}-${{ matrix.arch }}
|
||||
- name: Cache buildroot
|
||||
id: br-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /var/cache
|
||||
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.pkg.arch }}-${{ matrix.pkg.pkg }}
|
||||
|
||||
- name: Build with Andaman
|
||||
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda/mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg
|
||||
|
||||
- name: Generating artifact name
|
||||
id: art
|
||||
|
||||
@@ -25,8 +25,15 @@ jobs:
|
||||
- name: Set up git repository
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Build with Anda
|
||||
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}
|
||||
- name: Cache buildroot
|
||||
id: br-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /var/cache
|
||||
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.pkg.arch }}-${{ matrix.pkg.pkg }}
|
||||
|
||||
- name: Build with Andaman
|
||||
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda/mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg
|
||||
|
||||
- name: Generating artifact name
|
||||
id: art
|
||||
|
||||
@@ -2,11 +2,16 @@ config_opts['root'] = 'terra-{{ releasever }}-{{ target_arch }}'
|
||||
config_opts['dist'] = 'fc{{ releasever }}' # only useful for --resultdir variable subst
|
||||
config_opts['macros']['%dist'] = '.fc{{ releasever }}'
|
||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
|
||||
config_opts['package_manager'] = 'dnf'
|
||||
config_opts['package_manager'] = 'dnf5'
|
||||
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
|
||||
config_opts['mirrored'] = True
|
||||
config_opts['plugin_conf']['tmpfs_enable'] = True
|
||||
config_opts['plugin_conf']['root_cache_enable'] = True
|
||||
config_opts['plugin_conf']['yum_cache_enable'] = True
|
||||
config_opts['plugin_conf']['ccache_enable'] = True
|
||||
config_opts['plugin_conf']['ccache_opts']['compress'] = 'on'
|
||||
# repos
|
||||
config_opts['dnf.conf'] = """
|
||||
dnf_conf = """
|
||||
|
||||
[main]
|
||||
keepcache=1
|
||||
@@ -37,13 +42,50 @@ enabled=1
|
||||
enabled_metadata=1
|
||||
metadata_expire=4h
|
||||
|
||||
[local]
|
||||
name=local
|
||||
baseurl=https://lapis.ultramarine-linux.org/kojifiles/repos/um{{ releasever }}-build/latest/$basearch/
|
||||
cost=2000
|
||||
enabled={{ not mirrored }}
|
||||
skip_if_unavailable=False
|
||||
assumeyes=True
|
||||
# RPMFusion
|
||||
# We do not check GPG keys, because I can't find a direct link to the GPG key
|
||||
|
||||
[rpmfusion-free]
|
||||
name=RPM Fusion for Fedora $releasever - Free
|
||||
#baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
|
||||
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-$releasever&arch=$basearch
|
||||
enabled=1
|
||||
metadata_expire=14d
|
||||
type=rpm-md
|
||||
gpgcheck=0
|
||||
repo_gpgcheck=0
|
||||
|
||||
[rpmfusion-free-updates]
|
||||
name=RPM Fusion for Fedora $releasever - Free - Updates
|
||||
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/
|
||||
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-$releasever&arch=$basearch
|
||||
enabled=1
|
||||
enabled_metadata=1
|
||||
type=rpm-md
|
||||
gpgcheck=0
|
||||
repo_gpgcheck=0
|
||||
|
||||
[rpmfusion-nonfree]
|
||||
name=RPM Fusion for Fedora $releasever - Nonfree
|
||||
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/releases/$releasever/Everything/$basearch/os/
|
||||
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-$releasever&arch=$basearch
|
||||
enabled=1
|
||||
enabled_metadata=1
|
||||
metadata_expire=14d
|
||||
type=rpm-md
|
||||
gpgcheck=0
|
||||
repo_gpgcheck=0
|
||||
|
||||
[rpmfusion-nonfree-updates]
|
||||
name=RPM Fusion for Fedora $releasever - Nonfree - Updates
|
||||
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/updates/$releasever/$basearch/
|
||||
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-updates-released-$releasever&arch=$basearch
|
||||
enabled=1
|
||||
enabled_metadata=1
|
||||
type=rpm-md
|
||||
gpgcheck=0
|
||||
repo_gpgcheck=0
|
||||
|
||||
|
||||
{% if mirrored %}
|
||||
[fedora]
|
||||
@@ -177,3 +219,7 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
skip_if_unavailable=False
|
||||
{% endif %}
|
||||
"""
|
||||
|
||||
|
||||
config_opts['dnf.conf'] = dnf_conf
|
||||
config_opts['dnf5.conf'] = dnf_conf
|
||||
Reference in New Issue
Block a user