194 lines
4.9 KiB
YAML
194 lines
4.9 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
ubuntu:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: build-test
|
|
run: |
|
|
gcc main.c -o ruapu
|
|
./ruapu
|
|
- name: build-test-clang
|
|
run: |
|
|
clang main.c -o ruapu-clang
|
|
./ruapu-clang
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
- name: build-test-python
|
|
run: |
|
|
python3 -m pip install pip -U
|
|
python3 -m pip install setuptools -U
|
|
cd python
|
|
pip3 install .
|
|
python3 -c 'import ruapu; print(ruapu.supports("neon")); print(ruapu.supports(isa="avx"))'
|
|
python3 -c 'import ruapu; print(ruapu.rua())'
|
|
- name: build-test-rust
|
|
run: |
|
|
rustup update stable
|
|
rustup default stable
|
|
cd rust
|
|
cargo build --verbose
|
|
cargo test --verbose
|
|
- uses: erlef/setup-beam@v1
|
|
with:
|
|
otp-version: 26.2
|
|
rebar3-version: "3.22.1"
|
|
- name: build-test-erlang
|
|
run: |
|
|
cd erlang
|
|
rebar3 compile
|
|
rebar3 eunit
|
|
- name: build-test-golang
|
|
run: |
|
|
cd go
|
|
go build -o ruapu-go
|
|
./ruapu-go
|
|
|
|
macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: build-test
|
|
run: |
|
|
clang main.c -o ruapu
|
|
./ruapu
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
- name: build-test-python
|
|
run: |
|
|
python3 -m pip install pip -U
|
|
python3 -m pip install setuptools -U
|
|
cd python
|
|
pip3 install .
|
|
python3 -c 'import ruapu; print(ruapu.supports("neon")); print(ruapu.supports(isa="avx"))'
|
|
python3 -c 'import ruapu; print(ruapu.rua())'
|
|
- name: build-test-rust
|
|
run: |
|
|
rustup update stable
|
|
rustup default stable
|
|
cd rust
|
|
cargo build --verbose
|
|
cargo test --verbose
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.21.x
|
|
- name: build-test-golang
|
|
run: |
|
|
cd go
|
|
go build -o ruapu-go
|
|
./ruapu-go
|
|
|
|
macos-arm64:
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: build-test
|
|
run: |
|
|
clang main.c -o ruapu
|
|
./ruapu
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
- name: build-test-python
|
|
run: |
|
|
python3 -m pip install pip -U
|
|
python3 -m pip install setuptools -U
|
|
cd python
|
|
pip3 install .
|
|
python3 -c 'import ruapu; print(ruapu.supports("neon")); print(ruapu.supports(isa="avx"))'
|
|
python3 -c 'import ruapu; print(ruapu.rua())'
|
|
- name: build-test-rust
|
|
run: |
|
|
rustup update stable
|
|
rustup default stable
|
|
cd rust
|
|
cargo build --verbose
|
|
cargo test --verbose
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.21.x
|
|
- name: build-test-golang
|
|
run: |
|
|
cd go
|
|
go build -o ruapu-go
|
|
./ruapu-go
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- name: build-test
|
|
run: |
|
|
cl.exe /Fe: ruapu.exe main.c
|
|
.\ruapu.exe
|
|
- name: build-test-mingw
|
|
shell: bash
|
|
run: |
|
|
gcc main.c -o ruapu-mingw.exe
|
|
./ruapu-mingw.exe
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
- name: build-test-python
|
|
run: |
|
|
python3 -m pip install pip -U
|
|
python3 -m pip install setuptools -U
|
|
cd python
|
|
pip3 install .
|
|
python3 -c 'import ruapu; print(ruapu.supports("neon")); print(ruapu.supports(isa="avx"))'
|
|
python3 -c 'import ruapu; print(ruapu.rua())'
|
|
- name: build-test-rust
|
|
run: |
|
|
rustup update stable
|
|
rustup default stable
|
|
cd rust
|
|
cargo build --verbose
|
|
cargo test --verbose
|
|
- uses: erlef/setup-beam@v1
|
|
with:
|
|
otp-version: 26.2
|
|
rebar3-version: "3.22.1"
|
|
- name: build-test-erlang
|
|
run: |
|
|
cd erlang
|
|
rebar3 compile
|
|
rebar3 eunit
|
|
- name: build-test-golang
|
|
run: |
|
|
cd go
|
|
go build -o ruapu-go.exe
|
|
./ruapu-go.exe
|
|
|
|
qemu:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [ arm, arm64, mips64le, ppc64le, riscv64, s390x ]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: setup-qemu
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: linux/${{ matrix.arch }}
|
|
- name: build-test
|
|
run: |
|
|
docker run -u root --rm -v $(pwd):/${{ github.workspace }} -w ${{ github.workspace }} --platform linux/${{ matrix.arch }} debian:unstable-slim \
|
|
/bin/bash -c "apt update && apt install -y gcc libc6-dev && gcc main.c -o ruapu && ./ruapu"
|