-
-
Notifications
You must be signed in to change notification settings - Fork 25
71 lines (61 loc) · 3.17 KB
/
bootstrap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Bootstrap Andaman and Subatomic
on:
workflow_dispatch:
jobs:
bootstrap:
strategy:
matrix:
version: ["10"]
arch: ["x86_64", "aarch64"]
fail-fast: true
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }}
container:
image: quay.io/centos/centos:stream${{ matrix.version }}-development
options: --cap-add=SYS_ADMIN --privileged
steps:
- uses: actions/checkout@v4
with:
ref: el${{ matrix.version }}
fetch-depth: 1
- name: Install repositories
run: |
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
dnf install -y https://dl.fedoraproject.org/pub/epel/${{ matrix.version }}/Everything/${{ matrix.arch }}/os/Packages/e/epel-release-${{ matrix.version }}-1.el${{ matrix.version }}_0.noarch.rpm
sed -Ei "s@^#baseurl=.+@baseurl=https://dl.fedoraproject.org/pub/epel/\$releasever_major\${releasever_minor:+.\$releasever_minor}/Everything/\$basearch/os/@" /etc/yum.repos.d/epel.repo
sed -Ei '/^metalink/ s/^/#/' /etc/yum.repos.d/epel.repo
dnf install -y mock wget git-core openssl-devel cargo podman fuse-overlayfs rpm-build mock
dnf builddep -y anda/{terra/{mock-configs,srpm-macros},tools/buildsys/subatomic}/*.spec
- name: Install Anda
run: cargo install anda
- name: Build terra-mock-configs
run: |
echo "PATH=$PATH:/github/home/.cargo/bin" >> $GITHUB_ENV
export PATH=$PATH:/github/home/.cargo/bin
git config --global --add safe.directory "$GITHUB_WORKSPACE"
anda build -c almalinux-${{ matrix.version }}-${{ matrix.arch }} anda/terra/mock-configs/pkg --rpm-builder=rpmbuild
- name: Install terra-mock-configs
run: dnf install -y anda-build/rpm/rpms/terra-mock-configs*.rpm
- name: Build anda-srpm-macros
run: anda build -c terra-el${{ matrix.version }}-dev-${{ matrix.arch }}.cfg anda/terra/srpm-macros/pkg --rpm-builder=rpmbuild
- name: Build Subatomic
run: anda build -c terra-el${{ matrix.version }}-dev-${{ matrix.arch }}.cfg anda/tools/buildsys/subatomic/pkg --rpm-builder=rpmbuild
- name: Install Subatomic and anda-srpm-macros
run: dnf install -y ./anda-build/rpm/rpms/{subatomic,anda-srpm-macros}-*.rpm
- name: Install Build Dependencies for Andaman
run: dnf builddep -y anda/tools/buildsys/anda/*.spec
- name: Build Andaman
run: anda build -c terra-el${{ matrix.version }}-dev-${{ matrix.arch }} anda/tools/buildsys/anda/pkg --rpm-builder=rpmbuild
- name: Upload packages to subatomic
run: |
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
terrael${{ matrix.version }} anda-build/rpm/rpms/*
- name: Upload source packages to subatomic
if: github.event_name == 'push'
run: |
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
terrael${{ matrix.version }}-source anda-build/rpm/srpm/*