|
| 1 | +name: Build for macos |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + tags: |
| 8 | + - 'v[0-9]+.[0-9]+.[0-9]+' |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: macos-12 |
| 13 | + defaults: |
| 14 | + run: |
| 15 | + shell: bash -l -eo pipefail {0} |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v4 |
| 19 | + with: |
| 20 | + submodules: 'recursive' |
| 21 | + - name: Deps checkout |
| 22 | + uses: actions/checkout@v3 |
| 23 | + with: |
| 24 | + path: setup |
| 25 | + sparse-checkout-cone-mode: false |
| 26 | + sparse-checkout: | |
| 27 | + .install |
| 28 | + tests/pytest/requirements.* |
| 29 | + - name: Setup specific |
| 30 | + working-directory: setup/.install |
| 31 | + run: ./install_script.sh ${{ steps.mode.outputs.mode }} |
| 32 | + - name: Full checkout |
| 33 | + uses: actions/checkout@v3 |
| 34 | + with: |
| 35 | + submodules: recursive |
| 36 | + - name: Setup common |
| 37 | + run: .install/common_installations.sh ${{ steps.mode.outputs.mode }} |
| 38 | + |
| 39 | + - name: Get Redis |
| 40 | + uses: actions/checkout@v4 |
| 41 | + with: |
| 42 | + repository: redis/redis |
| 43 | + ref: 'unstable' # todo change per version/tag |
| 44 | + path: redis |
| 45 | + - name: Build Redis |
| 46 | + working-directory: redis |
| 47 | + run: make install |
| 48 | + - name: Build module |
| 49 | + run: | |
| 50 | + make build |
| 51 | + - name: Test |
| 52 | + run: | |
| 53 | + make test |
| 54 | + - name: Pack module |
| 55 | + run: | |
| 56 | + make pack BRANCH=${{ github.ref_name }} |
| 57 | + - name: Configure AWS credentials |
| 58 | + uses: aws-actions/configure-aws-credentials@v4 |
| 59 | + with: |
| 60 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 61 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 62 | + aws-region: "us-east-1" |
| 63 | + - name: Upload artifacts to S3 - staging |
| 64 | + run: | |
| 65 | + make upload-artifacts SHOW=1 VERBOSE=1 |
| 66 | + make upload-release SHOW=1 STAGING=1 VERBOSE=1 |
| 67 | + - name: Upload artifacts to S3 - release # todo: trigger this manually instead |
| 68 | + if: ${{ github.ref != 'refs/heads/master' }} |
| 69 | + run: make upload-release SHOW=1 VERBOSE=1 |
0 commit comments