diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index fc1cc75..030338c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -12,7 +12,38 @@ jobs: runs-on: ubuntu-latest steps: - name: Install packages - run: sudo apt-get install -y libreadline-dev libgc-dev llvm clang lld + run: | + sudo apt-get update + sudo apt-get install -y libreadline-dev libgc-dev llvm clang + + - uses: actions/checkout@v4 + + - name: Build and bootstrap + run: ./bootstrap.sh + + - name: Test + run: ./runtests.sh + + - name: Perf + run: ./runperf.sh + + - name: Mal tests + run: ./run-mal-tests.sh + + build-macos: + runs-on: macos-14 + env: + LDFLAGS: "-L/opt/homebrew/opt/llvm/lib -L/opt/homebrew/Cellar/bdw-gc/8.2.6/lib" + + steps: + - name: Install packages + run: | + brew update + brew install readline bdw-gc llvm + echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH + + - name: Find libgc + run: find /opt/homebrew/Cellar/bdw-gc -ls - uses: actions/checkout@v4 diff --git a/malc b/malc index de0e04f..b7bd7d7 100755 --- a/malc +++ b/malc @@ -92,7 +92,7 @@ llc -filetype=obj "${outfile}.opt.ll" -o "${outfile}.o" # Link log "Linking executable file: ${outfile}" -clang -no-pie -g "${outfile}.o" -lgc -lreadline -lstdc++ -o "${outfile}" +clang -no-pie -g ${LDFLAGS:-} "${outfile}.o" -lgc -lreadline -lstdc++ -o "${outfile}" # Cleanup log "Cleaning up"