|
| 1 | +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| 3 | + |
| 4 | +name: Node.js CI |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ publish-locally-ci ] |
| 9 | + pull_request: |
| 10 | + branches: [ publish-locally-ci ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + node-version: [8.9.4] |
| 18 | + platform: [ubuntu-16.04, macos-latest, windows-latest] |
| 19 | + |
| 20 | + runs-on: ${{ matrix.platform }} |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Get current date |
| 24 | + uses: 1466587594/get-current-time@v2 |
| 25 | + id: date |
| 26 | + with: |
| 27 | + format: YYYY_MM_DD |
| 28 | + utcOffset: "+08:00" |
| 29 | + - name: Download ljm |
| 30 | + if: ${{ matrix.platform == 'ubuntu-16.04' }} |
| 31 | + uses: wei/wget@v1 |
| 32 | + with: |
| 33 | + args: -O labjack_ljm_software.tar.gz https://labjack.com/sites/default/files/software/labjack_ljm_software_2019_07_16_x86_64.tar.gz |
| 34 | + - name: Install ljm |
| 35 | + if: ${{ matrix.platform == 'ubuntu-16.04' }} |
| 36 | + run: tar xfz labjack_ljm_software.tar.gz && cd ./labjack_ljm_software_2019_07_16_x86_64 && sudo ./labjack_ljm_installer.run |
| 37 | + - uses: actions/checkout@v2 |
| 38 | + - name: Use Node.js ${{ matrix.node-version }} |
| 39 | + uses: actions/setup-node@v1 |
| 40 | + with: |
| 41 | + node-version: ${{ matrix.node-version }} |
| 42 | + # - run: npm ci # doesn't work with node8 |
| 43 | + - run: npm install --global node-gyp@latest |
| 44 | + - run: npm install --global --production windows-build-tools --vs2015 |
| 45 | + if: ${{ matrix.platform == 'windows-latest' }} |
| 46 | + - run: npm install |
| 47 | + - run: npm config set msvs_version 2015 |
| 48 | + - run: npm run setup |
| 49 | + - name: Fix lerna mess |
| 50 | + run: node ./scripts/fix_lerna_backup.js |
| 51 | + - run: npm run build |
| 52 | + - run: SKIP_HARDWARE_TEST=true npm run test |
| 53 | + if: ${{ matrix.platform == 'ubuntu-16.04' }} |
| 54 | + |
| 55 | + - run: ls ./ljswitchboard-builder |
| 56 | + |
| 57 | + - uses: actions/upload-artifact@v2 |
| 58 | + with: |
| 59 | + name: kipling.3.1.18.${{ steps.date.outputs.date }}_linux64.tar.gz |
| 60 | + path: ljswitchboard-builder/kipling.3.1.18.${{ steps.date.outputs.formattedTime }}_linux64.tar.gz |
| 61 | + if: ${{ matrix.platform == 'ubuntu-16.04' }} |
| 62 | + - uses: actions/upload-artifact@v2 |
| 63 | + with: |
| 64 | + name: kipling.3.1.18.${{ steps.date.outputs.date }}_windows.zip |
| 65 | + path: ljswitchboard-builder/kipling.3.1.18.${{ steps.date.outputs.formattedTime }}_win64.zip |
| 66 | + if: ${{ matrix.platform == 'windows-latest' }} |
| 67 | + - uses: actions/upload-artifact@v2 |
| 68 | + with: |
| 69 | + name: kipling.3.1.18.${{ steps.date.outputs.date }}_macos.zip |
| 70 | + path: ljswitchboard-builder/kipling.3.1.18.${{ steps.date.outputs.formattedTime }}_mac64.zip |
| 71 | + if: ${{ matrix.platform == 'macos-latest' }} |
0 commit comments