Hello RISC-V #450
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: Hello RISC-V | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| hello: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04-riscv, ubuntu-24.04] | |
| steps: | |
| - run: echo "hello from $(uname -m)" | |
| debug: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04-riscv, ubuntu-24.04, ubuntu-24.04-arm] | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| # RUNNER_CONTEXT: ${{ toJson(runner) }} | |
| steps: | |
| - run: id | |
| - run: cat /etc/passwd | |
| - run: cat /etc/group- | |
| - run: sudo ls -alh /etc/sudoers.d | |
| - run: sudo tail -n 100 /etc/sudoers /etc/sudoers.d/runner || true | |
| - run: ps aux --forest | |
| - run: cat /etc/hostname | |
| - run: printenv | |
| - run: dpkg --list | |
| - run: apt-mark showmanual | |
| - run: ls -alh /usr/local | |
| - run: ls -alh /usr/local/bin | |
| - run: ls -alh /opt/hostedtoolcache | |
| - run: ls -alh /opt/hostedtoolcache/Python || true | |
| - run: ls -alh /opt/hostedtoolcache/Python/*.*.* || true | |
| - run: ls -alh /opt/hostedtoolcache/Python/*.*.*/{x64,riscv64}/bin || true | |
| - run: readelf -d /opt/hostedtoolcache/Python/3.{12,13,14}.*/{x64,riscv64}/bin/python3 || true | |
| - run: sudo find /opt -maxdepth 5 -printf '%M %u:%g %p\n' | |
| - run: find /home/runner -maxdepth 5 | |
| - run: find /home/runner/actions-runner/cached/2.*.*/externals -maxdepth 3 || true | |
| - run: >- | |
| which | |
| mvn | |
| ant | |
| gradle | |
| java | |
| python3 | |
| python | |
| gh | |
| kubectl | |
| ninja | |
| rustc | |
| rustup | |
| cargo | |
| go | |
| - run: >- | |
| which | |
| mvn | |
| ant | |
| gradle | |
| java | |
| python3 | |
| python | |
| gh | |
| kubectl | |
| ninja | |
| rustc | |
| rustup | |
| cargo | |
| go | |
| | xargs realpath | |
| - run: >- | |
| which | |
| mvn | |
| ant | |
| gradle | |
| java | |
| python3 | |
| python | |
| gh | |
| kubectl | |
| ninja | |
| rustc | |
| rustup | |
| cargo | |
| go | |
| | xargs realpath | |
| | xargs dpkg -S || true | |
| debug-container: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: | |
| - ubuntu-24.04-riscv | |
| - ubuntu-24.04 | |
| container: ubuntu:24.04 | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| # RUNNER_CONTEXT: ${{ toJson(runner) }} | |
| steps: | |
| - run: printenv | |
| - run: dpkg --list | |
| - run: find /__e -maxdepth 3 | |
| - name: Setup Python 3.12 | |
| uses: riseproject-dev/setup-python@main | |
| with: | |
| python-version: 3.12 | |
| mirror: ${{ matrix.runs-on == 'ubuntu-24.04-riscv' && 'https://raw.githubusercontent.com/riseproject-dev/python-versions/main' || '' }} | |
| - run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends bind9-dnsutils | |
| nslookup google.com | |
| setup-python: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04-riscv, ubuntu-24.04] | |
| python-version: | |
| - "3.14.2" | |
| - "3.13.12" | |
| - "3.13.0-rc.3" | |
| - "3.12" | |
| - "3" | |
| freethreaded: | |
| - false | |
| include: | |
| - runs-on: ubuntu-24.04-riscv | |
| python-version: "3.14.2" | |
| freethreaded: true | |
| - runs-on: ubuntu-24.04-riscv | |
| python-version: "3.14.2" | |
| freethreaded: false | |
| - runs-on: ubuntu-24.04 | |
| python-version: "3.14.2" | |
| freethreaded: true | |
| - runs-on: ubuntu-24.04 | |
| python-version: "3.14.2" | |
| freethreaded: false | |
| steps: | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: riseproject-dev/setup-python@main | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| freethreaded: ${{ matrix.freethreaded || false }} | |
| mirror: ${{ matrix.runs-on == 'ubuntu-24.04-riscv' && 'https://raw.githubusercontent.com/riseproject-dev/python-versions/main' || '' }} | |
| - run: python --version | |
| setup-python-upstream: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04-riscv, ubuntu-24.04] | |
| python-version: | |
| - "3.14" | |
| - "3.13" | |
| - "3.12" | |
| - "3.11" | |
| - "3.10" | |
| - "3" | |
| freethreaded: | |
| - false | |
| include: | |
| - runs-on: ubuntu-24.04-riscv | |
| python-version: "3.14" | |
| freethreaded: true | |
| - runs-on: ubuntu-24.04-riscv | |
| python-version: "3.14" | |
| freethreaded: false | |
| - runs-on: ubuntu-24.04 | |
| python-version: "3.14" | |
| freethreaded: true | |
| - runs-on: ubuntu-24.04 | |
| python-version: "3.14" | |
| freethreaded: false | |
| steps: | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| freethreaded: ${{ matrix.freethreaded || false }} | |
| - run: python --version | |
| sccache: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: | |
| - ubuntu-24.04 | |
| # - ubuntu-24.04-riscv # https://github.com/mozilla/sccache/issues/2681 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Configure sccache | |
| uses: hendrikmuhs/ccache-action@main | |
| with: | |
| variant: sccache | |
| key: sccache-${{ matrix.runs-on }} | |
| save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Build | |
| run: | | |
| set -eux -o pipefail | |
| which sccache | |
| sccache --version | |
| cd ccache-demo | |
| cmake -B build | |
| cmake --build build --verbose | |
| ./build/hello | |
| sccache --show-adv-stats | |
| ccache: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04, ubuntu-24.04-riscv] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Configure ccache | |
| uses: hendrikmuhs/ccache-action@main | |
| with: | |
| variant: ccache | |
| key: ccache-${{ matrix.runs-on }} | |
| save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| - name: Build | |
| run: | | |
| set -eux -o pipefail | |
| which ccache | |
| ccache --version | |
| ccache --zero-stats | |
| cd ccache-demo | |
| cmake -B build | |
| cmake --build build --verbose | |
| ./build/hello | |
| ccache --show-stats -vv | |
| setup-java: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04, ubuntu-24.04-riscv] | |
| java-version: [17, 21, 25] | |
| steps: | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: temurin | |
| - run: java -version | |
| setup-go: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04, ubuntu-24.04-riscv] | |
| go-version: [1.22, 1.23, 1.24, 1.24.1, 1.25, 1.26] | |
| steps: | |
| - name: Set up Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: go version | |
| docker: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04-riscv, ubuntu-24.04] | |
| steps: | |
| - run: docker ps | |
| - run: docker run --rm ubuntu:latest uname -m | |
| - run: | | |
| docker run --rm --interactive ubuntu:latest bash <<EOF | |
| apt-get update | |
| apt-get install -y --no-install-recommends bind9-dnsutils | |
| nslookup google.com | |
| EOF | |
| apt: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04, ubuntu-24.04-riscv] | |
| steps: | |
| - run: sudo apt update && sudo apt install -y vim |