Enable the full RV64G in the hardware targets. #960
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
| # SPDX-FileCopyrightText: ukoOS Contributors | |
| # | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| name: Build ukoOS | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: 'ubuntu-latest' | |
| container: | |
| image: docker.io/alpine:3.23 | |
| strategy: | |
| matrix: | |
| target: | |
| - milkv-duos | |
| - milkv-jupiter | |
| - milkv-jupiter-clang | |
| - qemu-riscv64 | |
| - qemu-riscv64-clang | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| toolchain_pkgs="" | |
| target=${{ matrix.target }} | |
| if [[ ${target} == *"clang" ]]; then | |
| toolchain_pkgs="clang lld llvm" | |
| else | |
| toolchain_pkgs="binutils-riscv-none-elf gcc-riscv-none-elf" | |
| fi | |
| apk add --no-interactive \ | |
| bash \ | |
| coreutils \ | |
| gdb-multiarch \ | |
| git \ | |
| make \ | |
| mdbook \ | |
| perl \ | |
| python3 \ | |
| qemu-system-riscv64 \ | |
| tar \ | |
| zstd \ | |
| $toolchain_pkgs | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: | | |
| git config --global --add safe.directory . | |
| export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) | |
| shortrev=$(git rev-parse --short HEAD) | |
| mkdir build | |
| cd build | |
| target=${{ matrix.target }} | |
| if [[ ${target} == *"clang" ]]; then | |
| ../configure --target ${target::-6} --clang | |
| else | |
| ../configure --target ${target} | |
| fi | |
| make -j$(nproc) -l$(nproc) V=1 | |
| name=ukoos-${{ matrix.target }}-git-$shortrev | |
| mkdir $name | |
| make DESTDIR=$(realpath $name) install | |
| tar --create --file $name.tar \ | |
| --format posix \ | |
| --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ | |
| --mtime "@$SOURCE_DATE_EPOCH" \ | |
| --sort name \ | |
| --owner 0 --group 0 --numeric-owner \ | |
| $name | |
| zstd -19 --threads=0 $name.tar | |
| sha256sum $name.tar $name.tar.zst | |
| cp $name.tar.zst ../ukoos-${{ matrix.target }}-git.tar.zst | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ukoos-${{ matrix.target }}-git.tar.zst | |
| path: ukoos-${{ matrix.target }}-git.tar.zst | |
| compression-level: 0 | |
| build-images: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: ukoos | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Run checks | |
| run: | | |
| nix flake check -L | |
| - name: Build images | |
| run: | | |
| nix build -L .#all-images | |
| - name: Upload images | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: images | |
| path: result/ |