mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 00:44:27 +00:00
bootstrap/install.sh and a share/finch lookup for the runtime and std; an ARM64 Linux seed; bootstrap/README.md; CI builds from the seed on x64 and ARM64 and runs every test on Windows (Wine) and ARM64 (qemu); README, install and layout sections of the guides (EN+PL) no longer talk about CMake; editors know enum, match and export. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015f73FesGZGYPkmDvUcj6QX
95 lines
3.2 KiB
YAML
95 lines
3.2 KiB
YAML
name: CI
|
|
|
|
# The compiler is written in Finch. It is built from bootstrap/<system>.ll, its own LLVM IR (see bootstrap/README.md),
|
|
# then from itself. Linux x86-64 and ARM64 have seeds; macOS and Windows machines can't build the compiler yet
|
|
# (programs for them are built from Linux with --target, and tested here under Wine and qemu).
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "ci/**"]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
|
|
jobs:
|
|
linux:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { os: ubuntu-24.04, arch: x64 }
|
|
- { os: ubuntu-24.04-arm, arch: arm64 }
|
|
name: linux-${{ matrix.arch }}
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install clang 21, libclang, tools
|
|
run: |
|
|
wget -q https://apt.llvm.org/llvm.sh
|
|
sudo bash llvm.sh 21
|
|
sudo apt-get install -y libclang-21-dev pkg-config valgrind
|
|
echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
|
|
- name: Build the compiler (seed, then itself, and the two must agree)
|
|
run: |
|
|
export FINCH_LIBCLANG="-L/usr/lib/llvm-21/lib -lclang-21"
|
|
bootstrap/build.sh
|
|
build/finch version
|
|
- name: Tests (programs, refusals, -g, a shared library, the language server)
|
|
run: tests/run.sh
|
|
- name: Tests under valgrind
|
|
if: matrix.arch == 'x64'
|
|
run: MEMCHECK=1 tests/run.sh
|
|
- name: Package
|
|
run: |
|
|
mkdir -p dist/finch && cp build/finch README.md LICENSE dist/finch/ && cp -r runtime std examples dist/finch/
|
|
tar -czf finch-linux-${{ matrix.arch }}.tar.gz -C dist finch
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: finch-linux-${{ matrix.arch }}
|
|
path: finch-linux-${{ matrix.arch }}.tar.gz
|
|
|
|
cross:
|
|
name: programs for ${{ matrix.target }}
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [windows, arm64]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install clang 21, libclang, cross compilers and emulators
|
|
run: |
|
|
wget -q https://apt.llvm.org/llvm.sh
|
|
sudo bash llvm.sh 21
|
|
sudo apt-get install -y libclang-21-dev pkg-config gcc-mingw-w64-x86-64 wine64 gcc-aarch64-linux-gnu qemu-user libc6-arm64-cross
|
|
echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
|
|
- name: Build the compiler
|
|
run: |
|
|
export FINCH_LIBCLANG="-L/usr/lib/llvm-21/lib -lclang-21"
|
|
bootstrap/build.sh
|
|
- name: Run every test on the other system
|
|
run: |
|
|
if [ "${{ matrix.target }}" = windows ]; then
|
|
FINCH_CC=x86_64-w64-mingw32-gcc tests/cross.sh windows
|
|
else
|
|
FINCH_CC=aarch64-linux-gnu-gcc QEMU_LD_PREFIX=/usr/aarch64-linux-gnu tests/cross.sh arm64
|
|
fi
|
|
|
|
vscode:
|
|
runs-on: ubuntu-24.04
|
|
defaults:
|
|
run:
|
|
working-directory: editors/vscode
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- run: npm ci
|
|
- name: Grammar test
|
|
run: npm test
|
|
- name: Package
|
|
run: npx vsce package --out finch-lang.vsix
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: finch-vscode
|
|
path: editors/vscode/finch-lang.vsix
|