mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
use tea to install ruby for our scripts
This commit is contained in:
parent
e27cb83c69
commit
53790ae38c
5 changed files with 16 additions and 14 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -62,16 +62,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
case ${{ matrix.os }} in
|
case ${{ matrix.os }} in
|
||||||
ubuntu-latest)
|
ubuntu-latest)
|
||||||
|
#FIXME our LLVM doesn't provide c/c++ headers for some reason
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get --yes install libc-dev libstdc++-8-dev libgcc-8-dev
|
apt-get --yes install libc-dev libstdc++-8-dev libgcc-8-dev
|
||||||
;;
|
;;
|
||||||
macos-11)
|
macos-11)
|
||||||
# screws up a lot of build scripts
|
#FIXME we need a clean install of macOS for builds
|
||||||
# TODO stop using GHA images or chroot or something
|
#TODO stop using GHA images or chroot or something
|
||||||
for x in /usr/local/*; do sudo mv $x /tmp; done
|
for x in /usr/local/*; do sudo mv $x /tmp; done
|
||||||
|
|
||||||
# for scripts/fix-machos.rb
|
|
||||||
sudo gem install ruby-macho
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -22,4 +22,3 @@ test:
|
||||||
test "$OUT" = "$INPUT"
|
test "$OUT" = "$INPUT"
|
||||||
env:
|
env:
|
||||||
INPUT: Hello, World!
|
INPUT: Hello, World!
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# ^^ we have to specify ruby or ruby refuses to run the script
|
||||||
|
# as an aside, what kind of feature *is* that exactly?
|
||||||
# ---
|
# ---
|
||||||
# dependencies:
|
# dependencies:
|
||||||
# ruby-lang.org: 2
|
# ruby-lang.org: 3
|
||||||
# bundler.io:
|
# args: [ruby]
|
||||||
# version: 3
|
|
||||||
# with:
|
|
||||||
# gems: [ruby-macho: 3]
|
|
||||||
# ---
|
# ---
|
||||||
|
|
||||||
|
require 'bundler/inline'
|
||||||
|
|
||||||
|
gemfile do
|
||||||
|
source 'https://rubygems.org'
|
||||||
|
gem 'ruby-macho', '~> 3'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
#TODO file.stat.ino where file is Pathname
|
#TODO file.stat.ino where file is Pathname
|
||||||
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
|
@ -116,6 +116,7 @@ async function __build(pkg: Package) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return await run({
|
return await run({
|
||||||
cmd: [
|
cmd: [
|
||||||
|
'tea',
|
||||||
prefix.join('fix-machos.rb'),
|
prefix.join('fix-machos.rb'),
|
||||||
installation.path,
|
installation.path,
|
||||||
...['bin', 'lib', 'libexec'].map(x => installation.path.join(x)).filter(x => x.isDirectory())
|
...['bin', 'lib', 'libexec'].map(x => installation.path.join(x)).filter(x => x.isDirectory())
|
||||||
|
|
|
@ -4,10 +4,7 @@
|
||||||
args:
|
args:
|
||||||
- deno
|
- deno
|
||||||
- run
|
- run
|
||||||
- --allow-net
|
|
||||||
- --allow-run
|
|
||||||
- --allow-read
|
- --allow-read
|
||||||
- --allow-write={{ tea.prefix }}
|
|
||||||
- --allow-env
|
- --allow-env
|
||||||
- --import-map={{ srcroot }}/import-map.json
|
- --import-map={{ srcroot }}/import-map.json
|
||||||
---*/
|
---*/
|
||||||
|
|
Loading…
Reference in a new issue