|  | 
|  | 1 | +name: Test and Prebuild | 
|  | 2 | +on: [push] | 
|  | 3 | +jobs: | 
|  | 4 | +  build-test-macos: | 
|  | 5 | +    if: startsWith(github.ref, 'refs/tags/') | 
|  | 6 | +    runs-on: macos-11 | 
|  | 7 | +    steps: | 
|  | 8 | +      - uses: actions/checkout@v2 | 
|  | 9 | +      - name: Setup node | 
|  | 10 | +        uses: actions/setup-node@v2 | 
|  | 11 | +        with: | 
|  | 12 | +          node-version: 12 | 
|  | 13 | +      - run: npm install | 
|  | 14 | +      - run: npm test | 
|  | 15 | +      - run: npm run prebuild | 
|  | 16 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 17 | +      - run: npm run prebuild-arm64 | 
|  | 18 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 19 | +      - run: tar --create --format ustar --verbose --file=prebuild-darwin.tar -C prebuilds . | 
|  | 20 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 21 | +      - name: Prebuild | 
|  | 22 | +        uses: softprops/action-gh-release@v1 | 
|  | 23 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 24 | +        with: | 
|  | 25 | +          files: prebuild-darwin.tar | 
|  | 26 | +  build-linux: | 
|  | 27 | +    if: startsWith(github.ref, 'refs/tags/') | 
|  | 28 | +    runs-on: ubuntu-18.04 | 
|  | 29 | +    container: quay.io/pypa/manylinux2014_x86_64 | 
|  | 30 | +    steps: | 
|  | 31 | +      - run: ldd --version ldd | 
|  | 32 | +      - uses: actions/checkout@v2 | 
|  | 33 | +      - name: Setup node | 
|  | 34 | +        uses: actions/setup-node@v2 | 
|  | 35 | +        with: | 
|  | 36 | +          node-version: 12 | 
|  | 37 | +      - run: npm install | 
|  | 38 | +      - run: npm run prebuild | 
|  | 39 | +      - run: npm test | 
|  | 40 | +      - run: tar --create --verbose --file=prebuild-linux.tar -C prebuilds . | 
|  | 41 | +      - name: Prebuild | 
|  | 42 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 43 | +        uses: softprops/action-gh-release@v1 | 
|  | 44 | +        with: | 
|  | 45 | +          files: prebuild-linux.tar | 
|  | 46 | +  build-alpine: | 
|  | 47 | +    runs-on: ubuntu-18.04 | 
|  | 48 | +    container: node:12.22-alpine | 
|  | 49 | +    steps: | 
|  | 50 | +      - run: apk add python3 py3-pip build-base | 
|  | 51 | +      - uses: actions/checkout@v2 | 
|  | 52 | +      - run: npm install | 
|  | 53 | +      - run: npm run prebuild-musl | 
|  | 54 | +      - run: npm test | 
|  | 55 | +      - run: tar --create --verbose --file=prebuild-alpine.tar -C prebuilds . | 
|  | 56 | +      - name: Prebuild | 
|  | 57 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 58 | +        uses: softprops/action-gh-release@v1 | 
|  | 59 | +        with: | 
|  | 60 | +          files: prebuild-alpine.tar | 
|  | 61 | +  build-linux-arm64: | 
|  | 62 | +    if: startsWith(github.ref, 'refs/tags/') | 
|  | 63 | +    runs-on: ubuntu-18.04 | 
|  | 64 | +    container: quay.io/pypa/manylinux_2_24_x86_64 | 
|  | 65 | +    steps: | 
|  | 66 | +      - run: apt-get update | 
|  | 67 | +      - run: apt-get install -y gcc-aarch64-linux-gnu | 
|  | 68 | +      - run: apt-get install -y g++-aarch64-linux-gnu | 
|  | 69 | +      - run: ldd --version ldd | 
|  | 70 | +      - uses: actions/checkout@v2 | 
|  | 71 | +      - name: Setup node | 
|  | 72 | +        uses: actions/setup-node@v2 | 
|  | 73 | +        with: | 
|  | 74 | +          node-version: 12 | 
|  | 75 | +      - run: npm install | 
|  | 76 | +      - run: npm run prebuild-arm64 | 
|  | 77 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 78 | +        env: | 
|  | 79 | +          CC: aarch64-linux-gnu-gcc | 
|  | 80 | +          CXX: aarch64-linux-gnu-g++ | 
|  | 81 | +      - run: tar --create --verbose --file=prebuild-linux-arm64.tar -C prebuilds . | 
|  | 82 | +      - name: Prebuild | 
|  | 83 | +        if: startsWith(github.ref, 'refs/tags/') | 
|  | 84 | +        uses: softprops/action-gh-release@v1 | 
|  | 85 | +        with: | 
|  | 86 | +          files: prebuild-linux-arm64.tar | 
0 commit comments