Skip to content

Ein paar Dinge korrigieren #421

Ein paar Dinge korrigieren

Ein paar Dinge korrigieren #421

Workflow file for this run

name: Build DDP and run tests
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
env:
DDPPATH: ${{ github.workspace }}/build/DDP/
steps:
- uses: actions/checkout@v4
- name: Setup and Cache Go
uses: magnetikonline/action-golang-cache@v5
with:
go-version-file: go.mod
cache-key-suffix: kompilierer
- name: Setup LLVM
if: runner.os == 'Linux'
run: sudo apt install llvm-12
- name: Cache LLVM
if: runner.os == 'Windows'
id: cache-llvm
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/llvm_build/
key: ${{ runner.os }}-llvm-build-${{ hashFiles('**/llvm_build/**') }}
restore-keys: |
${{ runner.os }}-llvm-build-
- name: Download Prebuilt LLVM
if: runner.os == 'Windows' && steps.cache-llvm.outputs.cache-hit != 'true'
run: |
curl -L -o ./llvm_build.tar.gz https://github.com/DDP-Projekt/Kompilierer/releases/download/llvm-binaries/llvm_build-mingw-12.2.0-x86_64-ucrt-posix-seh.tar.gz
mkdir -p ./llvm_build/
tar -xzf ./llvm_build.tar.gz -C ./ --force-local
rm ./llvm_build.tar.gz
- name: Get german locale
run: sudo locale-gen de_DE.UTF-8
if: runner.os == 'Linux'
- name: Set Env
if: runner.os == 'Windows'
run: |
echo "CGO_CPPFLAGS=$('${{ github.workspace }}/llvm_build/bin/llvm-config' --cppflags)" >> $GITHUB_ENV
echo "CGO_LDFLAGS=$('${{ github.workspace}}/llvm_build/bin/llvm-config' --ldflags --libs --system-libs all | tr '\r\n' ' ')" >> $GITHUB_ENV
echo "CGO_CXXFLAGS=-std=c++14" >> $GITHUB_ENV
- name: Cache pcre2
if: runner.os == 'Windows'
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/lib/stdlib/pcre2_build/
${{ github.workspace }}/lib/stdlib/libpcre2-8.a
key: ${{ runner.os }}-pcre2-${{ hashFiles('**/lib/stdlib/pcre2_build/**', '**/lib/stdlib/libpcre2-8.a') }}
restore-keys: |
${{ runner.os }}-pcre2-
- name: Build
run: make -j4
- name: Run tests
run: make test
- name: Upload Coverage Artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ runner.os }}
path: tests/coverage.md
retention-days: 30
- name: Build debug
run: make debug -j4
- name: Run memory tests
run: make test-memory