Add swap, using PARTUUID for fstab #102
Workflow file for this run
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: mkimg-th1520-ci | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
env: | |
ARCH: riscv | |
jobs: | |
mkrootfs: | |
strategy: | |
fail-fast: false | |
matrix: | |
model: [lpi4a, ahead, console, lpi4amain] | |
runs-on: ubuntu-22.04 | |
env: | |
BOARD: ${{ matrix.model }} | |
steps: | |
- name: Create Timestamp | |
run: | | |
echo "BUILD_ID=$(date +%Y%m%d_%H%M%S)" >> $GITHUB_ENV | |
echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV | |
- name: Install Software | |
run: | | |
sudo apt update && \ | |
sudo apt install -y gdisk dosfstools build-essential autoconf automake autotools-dev ninja-build make \ | |
libncurses-dev gawk flex bison openssl libssl-dev tree \ | |
gcc-riscv64-linux-gnu gfortran-riscv64-linux-gnu libgomp1-riscv64-cross \ | |
qemu-user-static binfmt-support mmdebstrap | |
wget https://mirror.iscas.ac.cn/revyos/revyos-addons/pool/main/r/revyos-keyring/revyos-keyring_2023.06.12_all.deb | |
sudo apt install ./revyos-keyring_2023.06.12_all.deb | |
- name: Checkout qemu | |
uses: actions/checkout@v3 | |
with: | |
repository: revyos/qemu | |
path: qemu | |
ref: ab8f84892a89feea60f1bb24432ff58ce6d2885c # TODO: remove this line | |
- name: build qemu | |
run: | | |
pushd qemu | |
./configure \ | |
--prefix=$HOME/qemu-install \ | |
--static \ | |
--target-list=riscv64-linux-user \ | |
--disable-system \ | |
--disable-pie \ | |
--interp-prefix=/etc/qemu-binfmt/%M | |
make -j$(nproc) | |
make install | |
sudo cp -fv $HOME/qemu-install/bin/qemu-riscv64 /usr/bin/qemu-riscv64-static | |
popd | |
ls -al /usr/bin/qemu-riscv64-static | |
sudo dpkg-reconfigure binfmt-support | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
path: 'mkimg-th1520' # TODO: make this name a global variable | |
- name: Make Image | |
run: | | |
# make revyos-release on CI | |
pushd mkimg-th1520 | |
echo "BUILD_ID=${{ env.BUILD_ID }}" >> revyos-release | |
echo "BUILD_DATE=${{ env.BUILD_DATE }}" >> revyos-release | |
echo "RELEASE_ID=${{ github.ref_name }}" >> revyos-release | |
echo "COMMIT_ID=${{ github.sha }}" >> revyos-release | |
echo "RUNNER_ID=${{ github.run_id }}" >> revyos-release | |
sudo -E ./mkrootfs.sh | |
popd | |
- name: Make Checksum file & Compress files | |
run: | | |
pushd mkimg-th1520 | |
sha256sum *.ext4 > SHA256SUMS | |
sha512sum *.ext4 > SHA512SUMS | |
zstd *.ext4 | |
popd | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 30 | |
name: th1520-${{ env.BOARD }}-${{ env.BUILD_ID }} | |
path: | | |
mkimg-th1520/*.ext4.zst | |
mkimg-th1520/SHA256SUMS | |
mkimg-th1520/SHA512SUMS | |
- name: 'Create release by tag' | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
mkimg-th1520/*.ext4.zst | |
mkimg-th1520/SHA256SUMS | |
mkimg-th1520/SHA512SUMS | |
token: ${{ secrets.GITHUB_TOKEN }} |