Gitea build steps + README.md
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
name: Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make
|
||||
|
||||
- name: Build unit tests
|
||||
run: |
|
||||
make test_lexer
|
||||
make test_parser
|
||||
make test_semantic
|
||||
make test_ir
|
||||
|
||||
- name: Run lexer tests
|
||||
run: ./test_lexer
|
||||
|
||||
- name: Run parser tests
|
||||
run: ./test_parser
|
||||
|
||||
- name: Run semantic tests
|
||||
run: ./test_semantic
|
||||
|
||||
- name: Run IR tests
|
||||
run: ./test_ir
|
||||
|
||||
integration-tests:
|
||||
name: Integration Tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: unit-tests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make
|
||||
|
||||
- name: Build integration tests
|
||||
run: |
|
||||
make test_runtime
|
||||
make test_strings
|
||||
make test_arrays
|
||||
make test_objects
|
||||
make test_instance_methods
|
||||
make test_fileio
|
||||
|
||||
- name: Run runtime tests
|
||||
run: ./test_runtime
|
||||
|
||||
- name: Run string tests
|
||||
run: ./test_strings
|
||||
|
||||
- name: Run array tests
|
||||
run: ./test_arrays
|
||||
|
||||
- name: Run object tests
|
||||
run: ./test_objects
|
||||
|
||||
- name: Run instance method tests
|
||||
run: ./test_instance_methods
|
||||
|
||||
- name: Run file I/O tests
|
||||
run: ./test_fileio
|
||||
|
||||
optimization-tests:
|
||||
name: Optimization Infrastructure Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make
|
||||
|
||||
- name: Build Phase 0 tests
|
||||
run: |
|
||||
make test_nanbox
|
||||
make test_fastframe
|
||||
make test_labeltable
|
||||
make test_methodcache
|
||||
|
||||
- name: Run NaN boxing tests
|
||||
run: ./test_nanbox
|
||||
|
||||
- name: Run fast frame tests
|
||||
run: ./test_fastframe
|
||||
|
||||
- name: Run label table tests
|
||||
run: ./test_labeltable
|
||||
|
||||
- name: Run method cache tests
|
||||
run: ./test_methodcache
|
||||
|
||||
benchmark:
|
||||
name: Performance Benchmark
|
||||
runs-on: ubuntu-latest
|
||||
needs: [unit-tests, integration-tests]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make python3
|
||||
|
||||
- name: Build benchmark
|
||||
run: make test_benchmark
|
||||
|
||||
- name: Run benchmark
|
||||
run: ./test_benchmark
|
||||
@@ -0,0 +1,53 @@
|
||||
name: PGO Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * 0'
|
||||
|
||||
jobs:
|
||||
pgo-build:
|
||||
name: Profile-Guided Optimization Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make python3
|
||||
|
||||
- name: Clean previous builds
|
||||
run: make clean
|
||||
|
||||
- name: Generate profile data
|
||||
run: make test_benchmark_pgo_gen
|
||||
|
||||
- name: Run profiling passes
|
||||
run: |
|
||||
./test_benchmark_pgo
|
||||
./test_benchmark_pgo
|
||||
./test_benchmark_pgo
|
||||
|
||||
- name: Build with PGO
|
||||
run: |
|
||||
gcc -Wall -Wextra -std=gnu99 -O3 -march=native -I. -fprofile-use -fprofile-correction \
|
||||
-o test_benchmark_pgo \
|
||||
lexer/lexer_tokenizer.c lexer/lexer_keywords.c lexer/lexer_literals.c \
|
||||
parser/parser.c parser/parser_expressions.c parser/parser_statements.c parser/parser_declarations.c parser/parser_printer.c \
|
||||
types/types.c \
|
||||
semantic/symbol_table.c semantic/semantic.c \
|
||||
ir/ir.c ir/ir_gen.c \
|
||||
runtime/runtime.c runtime/labeltable.c runtime/methodcache.c runtime/fastframe.c runtime/superinst.c \
|
||||
tests/test_benchmark.c \
|
||||
-ldl
|
||||
|
||||
- name: Run PGO benchmark
|
||||
run: ./test_benchmark_pgo
|
||||
|
||||
- name: Upload PGO binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rava-pgo
|
||||
path: test_benchmark_pgo
|
||||
@@ -0,0 +1,55 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
name: Build Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make
|
||||
|
||||
- name: Build all tests
|
||||
run: make all
|
||||
|
||||
- name: Run all tests
|
||||
run: |
|
||||
./test_lexer
|
||||
./test_parser
|
||||
./test_semantic
|
||||
./test_ir
|
||||
./test_runtime
|
||||
./test_strings
|
||||
./test_arrays
|
||||
./test_objects
|
||||
./test_instance_methods
|
||||
./test_fileio
|
||||
|
||||
- name: Build benchmark
|
||||
run: make test_benchmark
|
||||
|
||||
- name: Run benchmark
|
||||
run: ./test_benchmark
|
||||
|
||||
- name: Package release
|
||||
run: |
|
||||
mkdir -p release
|
||||
cp test_benchmark release/rava-benchmark
|
||||
cp -r examples release/
|
||||
cp README.md release/
|
||||
tar -czvf rava-${{ github.ref_name }}.tar.gz release/
|
||||
|
||||
- name: Upload release artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rava-${{ github.ref_name }}
|
||||
path: rava-${{ github.ref_name }}.tar.gz
|
||||
Reference in New Issue
Block a user