Skip to content

Commit

Permalink
Merge pull request #102 from gdams/risc
Browse files Browse the repository at this point in the history
add riscv64 support
  • Loading branch information
uraimo committed Dec 21, 2022
2 parents bc503dc + abefa6a commit b101fff
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/advanced-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ jobs:
distro: ubuntu18.04
- arch: ppc64le
distro: alpine_latest
- arch: riscv64
distro: ubuntu_latest
- arch: s390x
distro: fedora_latest
- arch: armv7
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/basic-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/floating-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build and run container
id: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swift-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
distro: buster
- arch: armv7
distro: jessie
- arch: riscv64
distro: alpine_edge
- arch: riscv64
distro: ubuntu20.04
- arch: s390x
distro: stretch
- arch: armv7
Expand All @@ -34,7 +38,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build and run container
id: build
Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.alpine_edge
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.alpine_latest
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.ubuntu20.04
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.ubuntu22.04
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.ubuntu_devel
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.ubuntu_latest
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.ubuntu_rolling
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -152,6 +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 | 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 |

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b101fff

Please sign in to comment.