From ab3d65fd41c2f8af3e4e7f6095fb144d60978755 Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 21 Dec 2022 12:53:58 +0000 Subject: [PATCH 1/5] add riscv64 support --- .github/workflows/advanced-example.yml | 2 ++ .github/workflows/test.yml | 2 ++ Dockerfiles/Dockerfile.riscv64.alpine_latest | 4 ++++ Dockerfiles/Dockerfile.riscv64.ubuntu20.04 | 4 ++++ Dockerfiles/Dockerfile.riscv64.ubuntu22.04 | 4 ++++ Dockerfiles/Dockerfile.riscv64.ubuntu_devel | 4 ++++ Dockerfiles/Dockerfile.riscv64.ubuntu_latest | 4 ++++ Dockerfiles/Dockerfile.riscv64.ubuntu_rolling | 4 ++++ README.md | 5 +++-- action.yml | 2 +- 10 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 Dockerfiles/Dockerfile.riscv64.alpine_latest create mode 100644 Dockerfiles/Dockerfile.riscv64.ubuntu20.04 create mode 100644 Dockerfiles/Dockerfile.riscv64.ubuntu22.04 create mode 100644 Dockerfiles/Dockerfile.riscv64.ubuntu_devel create mode 100644 Dockerfiles/Dockerfile.riscv64.ubuntu_latest create mode 100644 Dockerfiles/Dockerfile.riscv64.ubuntu_rolling diff --git a/.github/workflows/advanced-example.yml b/.github/workflows/advanced-example.yml index 93842b57..77aa1dec 100644 --- a/.github/workflows/advanced-example.yml +++ b/.github/workflows/advanced-example.yml @@ -15,6 +15,8 @@ jobs: distro: ubuntu18.04 - arch: ppc64le distro: alpine_latest + - arch: riscv64 + distro: ubuntu_latest - arch: s390x distro: fedora_latest - arch: armv7 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfb5dec3..e95a5876 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,8 @@ jobs: distro: buster - arch: armv7 distro: jessie + - arch: riscv64 + distro: ubuntu20.04 - arch: s390x distro: stretch - arch: armv7 diff --git a/Dockerfiles/Dockerfile.riscv64.alpine_latest b/Dockerfiles/Dockerfile.riscv64.alpine_latest new file mode 100644 index 00000000..22bdae72 --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.alpine_latest @@ -0,0 +1,4 @@ +FROM riscv64/alpine:latest + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/Dockerfiles/Dockerfile.riscv64.ubuntu20.04 b/Dockerfiles/Dockerfile.riscv64.ubuntu20.04 new file mode 100644 index 00000000..2a862e3b --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.ubuntu20.04 @@ -0,0 +1,4 @@ +FROM riscv64/ubuntu:20.04 + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/Dockerfiles/Dockerfile.riscv64.ubuntu22.04 b/Dockerfiles/Dockerfile.riscv64.ubuntu22.04 new file mode 100644 index 00000000..13987d24 --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.ubuntu22.04 @@ -0,0 +1,4 @@ +FROM riscv64/ubuntu:22.04 + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/Dockerfiles/Dockerfile.riscv64.ubuntu_devel b/Dockerfiles/Dockerfile.riscv64.ubuntu_devel new file mode 100644 index 00000000..3a843a69 --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.ubuntu_devel @@ -0,0 +1,4 @@ +FROM riscv64/ubuntu:devel + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/Dockerfiles/Dockerfile.riscv64.ubuntu_latest b/Dockerfiles/Dockerfile.riscv64.ubuntu_latest new file mode 100644 index 00000000..75c8e654 --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.ubuntu_latest @@ -0,0 +1,4 @@ +FROM riscv64/ubuntu:latest + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/Dockerfiles/Dockerfile.riscv64.ubuntu_rolling b/Dockerfiles/Dockerfile.riscv64.ubuntu_rolling new file mode 100644 index 00000000..def1fb7b --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.ubuntu_rolling @@ -0,0 +1,4 @@ +FROM riscv64/ubuntu:rolling + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/README.md b/README.md index d62b7c0e..8042b696 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A GitHub Action that executes commands on non-x86 CPU architecture (armv6, armv7 This action requires three input parameters: -* `arch`: CPU architecture: `armv6`, `armv7`, `aarch64`, `s390x`, or `ppc64le`. See [Supported Platforms](#supported-platforms) for the full matrix. +* `arch`: CPU architecture: `armv6`, `armv7`, `aarch64`, `riscv64`, `s390x`, or `ppc64le`. See [Supported Platforms](#supported-platforms) for the full matrix. * `distro`: Linux distribution name: `ubuntu16.04`, `ubuntu18.04`, `ubuntu20.04`, `bullseye`, `buster`, `stretch`, `jessie`, `fedora_latest`, `alpine_latest` or `archarm_latest`. See [Supported Platforms](#supported-platforms) for the full matrix. * `run`: Shell commands to execute in the container. @@ -152,7 +152,8 @@ This table details the valid `arch`/`distro` combinations: | armv6 | jessie, stretch, buster, bullseye, alpine_latest | | armv7 | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | | aarch64 | stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | -| s390x | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | +| riscv64 | jessie, stretch, buster, bullseye, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | +| s390x | ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, alpine_latest | | ppc64le | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04,ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | diff --git a/action.yml b/action.yml index b292b91d..ff1ae705 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ description: 'Run commands in a Linux container with a specific CPU architecture author: 'Umberto Raimondi, Elijah Shaw-Rutschman' inputs: arch: - description: 'CPU architecture: armv6, armv7, aarch64, s390x, ppc64le.' + description: 'CPU architecture: armv6, armv7, aarch64, riscv64, s390x, ppc64le.' required: false default: 'aarch64' distro: From 7f852ac0e1c3e394c43646dc0a474c5b4e719fab Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 21 Dec 2022 13:05:32 +0000 Subject: [PATCH 2/5] update actions/checkout --- .github/workflows/advanced-example.yml | 2 +- .github/workflows/basic-example.yml | 2 +- .github/workflows/floating-tag.yml | 2 +- .github/workflows/simple.yml | 2 +- .github/workflows/swift-build.yml | 2 +- .github/workflows/test.yml | 4 +++- README.md | 4 ++-- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/advanced-example.yml b/.github/workflows/advanced-example.yml index 77aa1dec..f16f92d2 100644 --- a/.github/workflows/advanced-example.yml +++ b/.github/workflows/advanced-example.yml @@ -23,7 +23,7 @@ jobs: distro: archarm_latest steps: - - uses: actions/checkout@v2.1.0 + - uses: actions/checkout@v3 - uses: ./ # If copying this example, change this to uraimo/run-on-arch-action@vX.Y.Z name: Build artifact id: build diff --git a/.github/workflows/basic-example.yml b/.github/workflows/basic-example.yml index 56b685ab..3203f670 100644 --- a/.github/workflows/basic-example.yml +++ b/.github/workflows/basic-example.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-18.04 name: Build on ubuntu-18.04 armv7 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: uraimo/run-on-arch-action@v2 name: Run commands id: runcmd diff --git a/.github/workflows/floating-tag.yml b/.github/workflows/floating-tag.yml index 95a9c53e..0e27c828 100644 --- a/.github/workflows/floating-tag.yml +++ b/.github/workflows/floating-tag.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest name: Update floating tag steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: fregante/setup-git-user@v1 - name: Tag and push run: | diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 0895666f..564935b6 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build and run container id: build diff --git a/.github/workflows/swift-build.yml b/.github/workflows/swift-build.yml index de135b60..23e5de36 100644 --- a/.github/workflows/swift-build.yml +++ b/.github/workflows/swift-build.yml @@ -7,7 +7,7 @@ jobs: name: A job to test the multi architecture actions steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build uses: ./ with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e95a5876..3fab98d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,8 @@ jobs: distro: buster - arch: armv7 distro: jessie + - arch: riscv64 + distro: alpine_latest - arch: riscv64 distro: ubuntu20.04 - arch: s390x @@ -36,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build and run container id: build diff --git a/README.md b/README.md index 8042b696..489cc181 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-18.04 name: Build on ubuntu-18.04 armv7 steps: - - uses: actions/checkout@v2.1.0 + - uses: actions/checkout@v3 - uses: uraimo/run-on-arch-action@v2 name: Run commands id: runcmd @@ -82,7 +82,7 @@ jobs: distro: fedora_latest steps: - - uses: actions/checkout@v2.1.0 + - uses: actions/checkout@v3 - uses: uraimo/run-on-arch-action@v2 name: Build artifact id: build From 7493af912b817758cf3cefb40ce1b788186a134b Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 21 Dec 2022 13:07:34 +0000 Subject: [PATCH 3/5] Update README.md Co-authored-by: Martin Grigorov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 489cc181..d9276750 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ This table details the valid `arch`/`distro` combinations: | armv6 | jessie, stretch, buster, bullseye, alpine_latest | | armv7 | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | | aarch64 | stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | -| riscv64 | jessie, stretch, buster, bullseye, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | +| riscv64 | jessie, stretch, buster, bullseye, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | | s390x | ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, alpine_latest | | ppc64le | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04,ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | From 1ca371e15f9962928cafec341b740cd92a5d749d Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 21 Dec 2022 13:10:33 +0000 Subject: [PATCH 4/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9276750..74031fb6 100644 --- a/README.md +++ b/README.md @@ -152,8 +152,8 @@ This table details the valid `arch`/`distro` combinations: | armv6 | jessie, stretch, buster, bullseye, alpine_latest | | armv7 | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | | aarch64 | stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | -| riscv64 | jessie, stretch, buster, bullseye, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | -| s390x | ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, alpine_latest | +| riscv64 | ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, alpine_latest | +| s390x | jessie, stretch, buster, bullseye, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | | ppc64le | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04,ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | From abefa6ae27aed52e4cd9e357753dab1d464e10ff Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 21 Dec 2022 13:11:17 +0000 Subject: [PATCH 5/5] fix alpine --- .github/workflows/test.yml | 2 +- Dockerfiles/Dockerfile.riscv64.alpine_edge | 4 ++++ README.md | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Dockerfiles/Dockerfile.riscv64.alpine_edge diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3fab98d7..2a997310 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - arch: armv7 distro: jessie - arch: riscv64 - distro: alpine_latest + distro: alpine_edge - arch: riscv64 distro: ubuntu20.04 - arch: s390x diff --git a/Dockerfiles/Dockerfile.riscv64.alpine_edge b/Dockerfiles/Dockerfile.riscv64.alpine_edge new file mode 100644 index 00000000..0b0c47ea --- /dev/null +++ b/Dockerfiles/Dockerfile.riscv64.alpine_edge @@ -0,0 +1,4 @@ +FROM riscv64/alpine:edge + +COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh +RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh diff --git a/README.md b/README.md index 74031fb6..fdbf823e 100644 --- a/README.md +++ b/README.md @@ -152,8 +152,8 @@ This table details the valid `arch`/`distro` combinations: | armv6 | jessie, stretch, buster, bullseye, alpine_latest | | armv7 | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | | aarch64 | stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest, archarm_latest | -| riscv64 | ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, alpine_latest | -| s390x | jessie, stretch, buster, bullseye, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | +| riscv64 | ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, alpine_edge | +| s390x | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest | | ppc64le | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04,ubuntu20.04, ubuntu22.04, ubuntu_latest, ubuntu_rolling, ubuntu_devel, fedora_latest, alpine_latest |