Bootstrap Andaman and Subatomic #44
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
name: Bootstrap Andaman and Subatomic | |
on: | |
workflow_dispatch: | |
jobs: | |
bootstrap: | |
strategy: | |
matrix: | |
version: ["rawhide"] | |
arch: ["x86_64", "aarch64"] | |
fail-fast: true | |
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} | |
container: | |
image: registry.fedoraproject.org/fedora-minimal:${{ matrix.version }} | |
options: --cap-add=SYS_ADMIN --privileged | |
steps: | |
- name: Install repositories | |
run: dnf5 install -y --setopt=install_weak_deps=False mock curl wget git-core openssl-devel cargo podman fuse-overlayfs | |
- name: Install Anda | |
run: cargo install anda | |
- uses: actions/checkout@v3 | |
with: | |
ref: f${{ matrix.version }} | |
fetch-depth: 1 | |
- 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 fedora-${{ matrix.version }}-${{ matrix.arch }} anda/terra/mock-configs/pkg -p rpm | |
- name: Install terra-mock-configs | |
run: dnf5 install -y anda-build/rpm/rpms/terra-mock-configs*.rpm | |
- name: Build anda-srpm-macros | |
run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/terra/srpm-macros/pkg | |
- name: Build Subatomic | |
run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/tools/buildsys/subatomic/pkg | |
- name: Install Subatomic | |
run: dnf5 install -y ./anda-build/rpm/rpms/subatomic-*.rpm | |
- name: Build Andaman | |
run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/tools/buildsys/anda/pkg | |
- name: Upload packages to subatomic | |
run: | | |
subatomic-cli upload --prune \ | |
--server https://subatomic.fyralabs.com \ | |
--token ${{ secrets.SUBATOMIC_TOKEN }} \ | |
terra${{ 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 }} \ | |
terra${{ matrix.version }}-source anda-build/rpm/srpm/* |