|
| 1 | +name: Build |
| 2 | +on: |
| 3 | + - push |
| 4 | + |
| 5 | +jobs: |
| 6 | + build-macos: |
| 7 | + name: Build (macOS) |
| 8 | + runs-on: macos-10.15 |
| 9 | + steps: |
| 10 | + - name: Checkout |
| 11 | + uses: actions/checkout@v2 |
| 12 | + - name: Bundle |
| 13 | + run: bundle install |
| 14 | + - name: Set Node.js version |
| 15 | + run: | |
| 16 | + bundle exec ruby -e 'puts Libv8Node::NODE_VERSION' | tee node_version |
| 17 | + - name: Download Node.js |
| 18 | + run: | |
| 19 | + ./download-node 12.18.4 |
| 20 | + - name: Extract Node.js |
| 21 | + run: | |
| 22 | + ./extract-node 12.18.4 |
| 23 | + - name: Build V8 |
| 24 | + run: | |
| 25 | + ./build-libv8 12.18.4 |
| 26 | + - name: Build Monolith |
| 27 | + run: | |
| 28 | + ./build-monolith 12.18.4 |
| 29 | + - name: Inject V8 |
| 30 | + run: | |
| 31 | + ./inject-libv8 12.18.4 |
| 32 | + - name: Build gem |
| 33 | + run: | |
| 34 | + bundle exec rake binary |
| 35 | + - name: Upload V8 |
| 36 | + uses: actions/upload-artifact@v1 |
| 37 | + with: |
| 38 | + name: v8-x86_64-darwin19 |
| 39 | + path: vendor |
| 40 | + - name: Upload gem |
| 41 | + uses: actions/upload-artifact@v1 |
| 42 | + with: |
| 43 | + name: gem-x86_64-darwin19 |
| 44 | + path: pkg |
| 45 | + build-linux-glibc: |
| 46 | + name: Build (Linux glibc) |
| 47 | + runs-on: ubuntu-20.04 |
| 48 | + container: ruby:2.7 |
| 49 | + steps: |
| 50 | + - name: Checkout |
| 51 | + uses: actions/checkout@v2 |
| 52 | + - name: Bundle |
| 53 | + run: bundle install |
| 54 | + - name: Download Node.js |
| 55 | + run: | |
| 56 | + ./download-node 12.18.4 |
| 57 | + - name: Extract Node.js |
| 58 | + run: | |
| 59 | + ./extract-node 12.18.4 |
| 60 | + - name: Build V8 |
| 61 | + run: | |
| 62 | + ./build-libv8 12.18.4 |
| 63 | + - name: Build Monolith |
| 64 | + run: | |
| 65 | + ./build-monolith 12.18.4 |
| 66 | + - name: Inject V8 |
| 67 | + run: | |
| 68 | + ./inject-libv8 12.18.4 |
| 69 | + - name: Build gem |
| 70 | + run: | |
| 71 | + bundle exec rake binary |
| 72 | + - name: Upload V8 |
| 73 | + uses: actions/upload-artifact@v1 |
| 74 | + with: |
| 75 | + name: v8-x86_64-linux-glibc |
| 76 | + path: vendor |
| 77 | + - name: Upload gem |
| 78 | + uses: actions/upload-artifact@v1 |
| 79 | + with: |
| 80 | + name: gem-x86_64-linux-glibc |
| 81 | + path: pkg |
| 82 | + build-linux-musl: |
| 83 | + name: Build (Linux musl) |
| 84 | + runs-on: ubuntu-20.04 |
| 85 | + container: ruby:2.7-alpine |
| 86 | + steps: |
| 87 | + - name: Install system dependencies |
| 88 | + run: apk add --no-cache build-base bash python2 python3 git curl tar clang binutils-gold |
| 89 | + - name: Checkout |
| 90 | + uses: actions/checkout@v2 |
| 91 | + - name: Bundle |
| 92 | + run: bundle install |
| 93 | + - name: Download Node.js |
| 94 | + run: | |
| 95 | + ./download-node 12.18.4 |
| 96 | + - name: Extract Node.js |
| 97 | + run: | |
| 98 | + ./extract-node 12.18.4 |
| 99 | + - name: Build V8 |
| 100 | + run: | |
| 101 | + ./build-libv8 12.18.4 |
| 102 | + - name: Build Monolith |
| 103 | + run: | |
| 104 | + ./build-monolith 12.18.4 |
| 105 | + - name: Inject V8 |
| 106 | + run: | |
| 107 | + ./inject-libv8 12.18.4 |
| 108 | + - name: Build gem |
| 109 | + run: | |
| 110 | + bundle exec rake binary |
| 111 | + - name: Prepare artifacts |
| 112 | + run: | |
| 113 | + mkdir -p ${{ runner.temp }}/workspace |
| 114 | + cp -Rv pkg ${{ runner.temp }}/workspace/ |
| 115 | + cp -Rv vendor ${{ runner.temp }}/workspace/ |
| 116 | + - name: Upload V8 |
| 117 | + uses: actions/upload-artifact@v1 |
| 118 | + with: |
| 119 | + name: v8-x86_64-linux-musl |
| 120 | + path: vendor |
| 121 | + - name: Upload gem |
| 122 | + uses: actions/upload-artifact@v1 |
| 123 | + with: |
| 124 | + name: gem-x86_64-linux-musl |
| 125 | + path: pkg |
0 commit comments