File: ci-macos.yml

package info (click to toggle)
alire 1.2.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 13,124 kB
  • sloc: ada: 77,497; python: 6,605; sh: 477; ansic: 347; makefile: 258; javascript: 87; xml: 40
file content (85 lines) | stat: -rw-r--r-- 2,064 bytes parent folder | download | duplicates (2)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI macOS

on:
  pull_request:
    paths-ignore:
      - 'doc/**'
      - '**.md'
      - '**.rst'
      - '**.txt'
  release:
    types: [created]

jobs:

  build:
    name: CI on macOS

    runs-on: macos-latest

    steps:
    - name: Check out repository
      uses: actions/checkout@v2
      with:
        submodules: true

    - name: Install toolchain
      uses: ada-actions/toolchain@ce2020
      with:
        distrib: community

    - name: Install Python 3.x (required for the testsuite)
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'

    - name: Run test script
      run: scripts/ci-github.sh
      shell: bash
      env:
        BRANCH: ${{ github.base_ref }}
        INDEX: ""

    - name: Upload binaries
      uses: actions/upload-artifact@v2
      with:
        name: alr-bin-macos.zip
        path: |
          bin/alr
          LICENSE.txt

    - name: Upload logs (if failed)
      if: failure()
      uses: actions/upload-artifact@master
      with:
        name: testsuite-log-macos.zip
        path: testsuite/out

    # Release steps start here. These only run during a release creation.

    - name: Retrieve upload URL for the release
      if: github.event_name == 'release'
      id: get_release
      uses: bruceadams/get-release@v1.2.1
      env:
        GITHUB_TOKEN: ${{ github.token }}

    - name: Get release version
      id: get_version
      if: github.event_name == 'release'
      uses: battila7/get-version-action@v2

    - name: Package release binaries
      if: github.event_name == 'release'
      run: zip alr-bin-macos.zip bin/alr LICENSE.txt

    - name: Upload release assets
      if: github.event_name == 'release'
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.get_release.outputs.upload_url }}
        asset_path: alr-bin-macos.zip
        asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-x86_64-macos.zip
        asset_content_type: application/zip