summaryrefslogtreecommitdiff
path: root/.github/workflows/build-tarball.yml
blob: 7e91c8fd007284570baab05628256001efb2665e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build from tarball

on:
  pull_request:
  push:
    branches:
      - master
      - v[0-9]+.x-staging
      - v[0-9]+.x

env:
  FLAKY_TESTS: dontcare

jobs:
  build-tarball:
    env:
      PYTHON_VERSION: 3.9
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ env.PYTHON_VERSION }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ env.PYTHON_VERSION }}
      - name: Environment Information
        run: npx envinfo
      - name: Make tarball
        run: |
          export DISTTYPE=nightly
          export DATESTRING=`date "+%Y-%m-%d"`
          export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA")
          ./configure && make tar -j8 SKIP_XZ=1
          mkdir tarballs
          mv *.tar.gz tarballs
      - name: Upload tarball artifact
        uses: actions/upload-artifact@v1
        with:
          name: tarballs
          path: tarballs
  test-tarball-linux:
    env:
      PYTHON_VERSION: 3.9
    needs: build-tarball
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ env.PYTHON_VERSION }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ env.PYTHON_VERSION }}
      - name: Environment Information
        run: npx envinfo
      - name: Download tarball
        uses: actions/download-artifact@v1
        with:
          name: tarballs
      - name: Extract tarball
        run: |
          tar xzf tarballs/*.tar.gz
          echo "TAR_DIR=`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
      - name: Copy directories needed for testing
        run: |
          cp -r tools/node_modules $TAR_DIR/tools
          cp -r tools/eslint-rules $TAR_DIR/tools
      - name: Build
        run: |
          cd $TAR_DIR
          make build-ci -j2 V=1
      - name: Test
        run: |
          cd $TAR_DIR
          make run-ci -j2 V=1 TEST_CI_ARGS="-p dots"