mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
3a7c25f987
This adds support for the well-known Boehm GC. It's significantly faster than our own naive GC and could be used as an alternative on bigger systems. In the future, this GC might also be supported on WebAssembly with some extra work. Right now it's Linux only (though Windows/MacOS shouldn't be too difficult to add).
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Nix
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- release
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
nix-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Uninstall system LLVM
|
|
# Hack to work around issue where we still include system headers for
|
|
# some reason.
|
|
# See: https://github.com/tinygo-org/tinygo/pull/4516#issuecomment-2416363668
|
|
run: sudo apt-get remove llvm-18
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Pull musl, bdwgc
|
|
run: |
|
|
git submodule update --init lib/musl lib/bdwgc
|
|
- name: Restore LLVM source cache
|
|
uses: actions/cache/restore@v4
|
|
id: cache-llvm-source
|
|
with:
|
|
key: llvm-source-19-linux-nix-v1
|
|
path: |
|
|
llvm-project/compiler-rt
|
|
- name: Download LLVM source
|
|
if: steps.cache-llvm-source.outputs.cache-hit != 'true'
|
|
run: make llvm-source
|
|
- name: Save LLVM source cache
|
|
uses: actions/cache/save@v4
|
|
if: steps.cache-llvm-source.outputs.cache-hit != 'true'
|
|
with:
|
|
key: ${{ steps.cache-llvm-source.outputs.cache-primary-key }}
|
|
path: |
|
|
llvm-project/compiler-rt
|
|
- uses: cachix/install-nix-action@v22
|
|
- name: Test
|
|
run: |
|
|
nix develop --ignore-environment --keep HOME --command bash -c "go install && ~/go/bin/tinygo version && ~/go/bin/tinygo build -o test ./testdata/cgo"
|