feat(cryptpilot-convert): skip boot partition creation in UKI mode #234
This file contains hidden or 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: Build RPM Package | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| branches: | |
| - 'master' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Check pre-release | |
| run: | | |
| tag="${GITHUB_REF#refs/*/}" | |
| echo "tag=tag" | |
| if [[ ${tag} == *alpha* || ${tag} == *beta* ]] | |
| then | |
| prerelease=true | |
| else | |
| prerelease=false | |
| fi | |
| echo "prerelease=$prerelease" | |
| echo "PRE_RELEASE=$prerelease" >> $GITHUB_ENV | |
| - uses: dtolnay/rust-toolchain@1.75.0 | |
| - name: Build RPM package | |
| run: | | |
| make create-tarball | |
| make rpm-build-in-docker | |
| mkdir -p $GITHUB_WORKSPACE/rpmbuild | |
| cp -r ~/rpmbuild/SRPMS/ $GITHUB_WORKSPACE/rpmbuild/ | |
| cp -r ~/rpmbuild/RPMS/ $GITHUB_WORKSPACE/rpmbuild/ | |
| mkdir -p $GITHUB_WORKSPACE/rpmbuild/SOURCES/ | |
| cp -r /tmp/cryptpilot-*.tar.gz $GITHUB_WORKSPACE/rpmbuild/SOURCES/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpm-packages | |
| if-no-files-found: error | |
| path: | | |
| ./rpmbuild/SOURCES/cryptpilot-*.tar.gz | |
| ./rpmbuild/SRPMS/*.src.rpm | |
| ./rpmbuild/RPMS/*/*.rpm | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distro: ["alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest", "registry.openanolis.cn/openanolis/anolisos:8", "registry.openanolis.cn/openanolis/anolisos:23"] | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| needs: build | |
| container: | |
| image: ${{ matrix.distro }} | |
| volumes: | |
| - /run/udev/control:/run/udev/control | |
| - /dev:/dev | |
| options: --privileged --ipc=host | |
| steps: | |
| - name: Update yum mirror | |
| run: | | |
| set -e | |
| set -x | |
| # replace the mirror | |
| sed -i -E 's|https?://mirrors.openanolis.cn/anolis/|https://mirrors.aliyun.com/anolis/|g' /etc/yum.repos.d/*.repo | |
| sed -i -E 's|https?://mirrors.cloud.aliyuncs.com/|https://mirrors.aliyun.com/|g' /etc/yum.repos.d/*.repo | |
| # install development tools | |
| yum install -y autoconf automake binutils bison flex gcc gcc-c++ gdb glibc-devel libtool make pkgconf pkgconf-m4 pkgconf-pkg-config rpm-build rpm-sign strace asciidoc byacc ctags diffstat elfutils-libelf-devel git intltool patchutils perl-Fedora-VSP perl-Sys-Syslog perl-generators pesign source-highlight systemtap valgrind valgrind-devel cmake expect rpmdevtools rpmlint perl clang | |
| # install rpmdevtools | |
| yum install -y git yum-utils | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.75.0 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./ | |
| merge-multiple: false | |
| - name: Install RPM packages | |
| run: | | |
| set -e | |
| set -x | |
| # test rpm package install | |
| yum install -y ./rpm-packages/RPMS/*/cryptpilot-*.rpm | |
| cryptpilot --version | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Install build dependencies | |
| run: yum-builddep -y ./cryptpilot.spec | |
| - name: Run test script from repo | |
| run: make run-test | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./ | |
| merge-multiple: false | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| fail_on_unmatched_files: true | |
| prerelease: ${{ env.PRE_RELEASE }} | |
| files: | | |
| ./rpm-packages/SOURCES/cryptpilot-*.tar.gz | |
| ./rpm-packages/SRPMS/*.src.rpm | |
| ./rpm-packages/RPMS/*/*.rpm |