Skip to content

Commit 4d5b0fc

Browse files
committed
Support Linuxulator on FreeBSD
1 parent 7902be7 commit 4d5b0fc

File tree

4 files changed

+310
-58
lines changed

4 files changed

+310
-58
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,46 @@ jobs:
8080
- os: ubuntu-latest
8181
vm:
8282
os: freebsd
83-
run: pkg install -y node npm protobuf ruby rubygem-bundler rubygem-rake
83+
run: |
84+
pkg install -y node npm protobuf ruby rubygem-bundler rubygem-rake
85+
- os: ubuntu-latest
86+
vm:
87+
os: freebsd
88+
run: |
89+
pkg install -y node npm ruby rubygem-bundler rubygem-rake
90+
sysrc linux_enable="YES"
91+
service linux start
92+
- os: ubuntu-latest
93+
vm:
94+
os: freebsd
95+
run: |
96+
pkg install -y node npm ruby rubygem-bundler rubygem-rake
97+
sysrc linux_enable="YES"
98+
service linux start
99+
pkg install -y linux_base-rl9
100+
- os: ubuntu-latest
101+
vm:
102+
os: freebsd
103+
run: |
104+
pkg install -y node npm ruby rubygem-bundler rubygem-rake
105+
sysrc linux_enable="YES"
106+
service linux start
107+
pkg install -y debootstrap
108+
debootstrap jammy /compat/ubuntu
109+
ln -sf ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /compat/ubuntu/lib64/ld-linux-x86-64.so.2
110+
sysctl compat.linux.emul_path=/compat/ubuntu
111+
- os: ubuntu-latest
112+
vm:
113+
os: freebsd
114+
run: |
115+
pkg install -y ruby rubygem-bundler rubygem-rake
116+
sysrc linux_enable="YES"
117+
service linux start
118+
pkg install -y debootstrap
119+
debootstrap jammy /compat/ubuntu
120+
ln -sf ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /compat/ubuntu/lib64/ld-linux-x86-64.so.2
121+
sysctl compat.linux.emul_path=/compat/ubuntu
122+
mount -t linprocfs linproc /compat/ubuntu/proc
84123
- os: ubuntu-latest
85124
vm:
86125
os: openbsd
@@ -90,11 +129,13 @@ jobs:
90129
- os: ubuntu-latest
91130
vm:
92131
os: netbsd
93-
run: /usr/sbin/pkg_add nodejs protobuf ruby
132+
run: |
133+
/usr/sbin/pkg_add nodejs protobuf ruby
94134
- os: ubuntu-latest
95135
vm:
96136
os: dragonflybsd
97-
run: pkg install -y libnghttp2 libuv node npm protobuf ruby rubygem-bundler rubygem-rake
137+
run: |
138+
pkg install -y libnghttp2 libuv node npm protobuf ruby rubygem-bundler rubygem-rake
98139
- os: ubuntu-latest
99140
vm:
100141
os: omnios
@@ -139,7 +180,7 @@ jobs:
139180
run: bundle exec rake compile
140181

141182
- name: Spec
142-
if: "!matrix.vm" # TODO: remove after https://github.com/sass/dart-sass/pull/2413
183+
if: "!matrix.vm || contains(matrix.vm.run, '/proc')" # TODO: remove after https://github.com/sass/dart-sass/pull/2413
143184
run: bundle exec rake spec
144185

145186
- name: Install

ext/sass/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
/pnpm-lock.yaml
1111
/protoc.exe
1212
/ruby/
13+
/true
1314
/yarn.lock

0 commit comments

Comments
 (0)