2021-08-25 01:33:02 +00:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
2022-05-27 00:32:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-08-25 01:33:02 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
test-posix:
|
|
|
|
name: Build and test on POSIX systems
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-09 01:55:10 +00:00
|
|
|
os: [ ubuntu-latest, macos-latest, macos-13 ]
|
2021-08-25 01:33:02 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Compile the project
|
|
|
|
run: make clean && make
|
|
|
|
- name: Test the project
|
2023-10-08 22:18:36 +00:00
|
|
|
run: make test
|
2021-08-25 01:33:02 +00:00
|
|
|
|
|
|
|
test-windows:
|
|
|
|
name: Build and test on Windows
|
2024-09-09 01:55:10 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-29 12:17:28 +00:00
|
|
|
os: [ windows-latest, windows-2019 ]
|
2024-09-09 01:55:10 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-08-25 01:33:02 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Build the project
|
|
|
|
shell: cmd
|
|
|
|
run: build_win
|
|
|
|
- name: Test the project
|
|
|
|
shell: cmd
|
|
|
|
run: build_win test
|
2023-01-22 17:05:27 +00:00
|
|
|
|
2024-10-11 01:42:12 +00:00
|
|
|
test-windows-min:
|
|
|
|
name: Build and test on Windows Minimal build
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ windows-2019 ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Install Python Dependencies
|
|
|
|
run: pip install meson ninja
|
|
|
|
- name: Build
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
meson setup build_meson_min --buildtype=release -Dsingle_threaded=true -Dnanbox=false -Ddynamic_modules=false -Ddocstrings=false -Dnet=false -Dsourcemaps=false -Dpeg=false -Dassembler=false -Dint_types=false -Dreduced_os=true -Dffi=false
|
|
|
|
cd build_meson_min
|
|
|
|
ninja
|
|
|
|
|
2023-01-22 17:05:27 +00:00
|
|
|
test-mingw:
|
2024-10-11 01:42:12 +00:00
|
|
|
name: Build on Windows with Mingw
|
2023-01-22 17:05:27 +00:00
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
2024-10-11 01:42:12 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
msystem: [ UCRT64, CLANG64 ]
|
2023-01-22 17:05:27 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup Mingw
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
2024-10-11 01:42:12 +00:00
|
|
|
msystem: ${{ matrix.msystem }}
|
2023-01-22 17:05:27 +00:00
|
|
|
update: true
|
|
|
|
install: >-
|
|
|
|
base-devel
|
|
|
|
git
|
2023-01-22 17:21:28 +00:00
|
|
|
gcc
|
2024-10-11 01:42:12 +00:00
|
|
|
- name: Build
|
|
|
|
shell: cmd
|
|
|
|
run: make -j4 CC=gcc
|
|
|
|
- name: Test
|
2023-01-22 17:05:27 +00:00
|
|
|
shell: cmd
|
2024-10-11 01:42:12 +00:00
|
|
|
run: make -j4 CC=gcc test
|
2023-05-18 12:20:38 +00:00
|
|
|
|
|
|
|
test-mingw-linux:
|
|
|
|
name: Build and test with Mingw on Linux + Wine
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup Mingw and wine
|
|
|
|
run: |
|
|
|
|
sudo dpkg --add-architecture i386
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install libstdc++6:i386 libgcc-s1:i386
|
|
|
|
sudo apt-get install gcc-mingw-w64-x86-64-win32 wine wine32 wine64
|
|
|
|
- name: Compile the project
|
|
|
|
run: make clean && make CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-gcc UNAME=MINGW RUN=wine
|
|
|
|
- name: Test the project
|
2024-05-25 20:50:51 +00:00
|
|
|
run: make test UNAME=MINGW RUN=wine VERBOSE=1
|
2023-06-24 17:13:51 +00:00
|
|
|
|
|
|
|
test-arm-linux:
|
|
|
|
name: Build and test ARM32 cross compilation
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup qemu and cross compiler
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install gcc-arm-linux-gnueabi qemu-user
|
|
|
|
- name: Compile the project
|
2024-11-11 19:02:54 +00:00
|
|
|
run: make RUN="qemu-arm -L /usr/arm-linux-gnueabi/" CC=arm-linux-gnueabi-gcc LD=arm-linux-gnueabi-gcc
|
2023-06-24 17:13:51 +00:00
|
|
|
- name: Test the project
|
2024-05-25 20:50:51 +00:00
|
|
|
run: make RUN="qemu-arm -L /usr/arm-linux-gnueabi/" SUBRUN="qemu-arm -L /usr/arm-linux-gnueabi/" test VERBOSE=1
|
2024-09-06 15:28:54 +00:00
|
|
|
|
|
|
|
test-s390x-linux:
|
|
|
|
name: Build and test s390x in qemu
|
2024-09-06 23:05:03 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-09-06 15:28:54 +00:00
|
|
|
steps:
|
2024-09-06 23:23:55 +00:00
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Do Qemu build and test
|
|
|
|
run: |
|
2024-09-06 23:31:57 +00:00
|
|
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
2024-11-11 19:02:54 +00:00
|
|
|
docker run --rm -v .:/janet --platform linux/s390x ubuntu bash -c "apt-get -y update && apt-get -y install git build-essential && cd /janet && make -j3 && make test"
|