Welcome to mirror list, hosted at ThFree Co, Russian Federation.

binary_packages.yml « workflows « .github - github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 34d8e32211b00f4cfc06308580bd83432fe3dc4a (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Build binary packages

on:
  workflow_dispatch:
  workflow_call:
  push:
    branches:
        - 'master'
    tags:
        - '*'

jobs:
  build_linux:
    name: Build binary on Ubuntu 20.04
    runs-on: ubuntu-20.04

    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v2
        with:
          path: nanopb
          fetch-depth: "0"

      - name: Install dependencies
        run: |
          python3 -m pip install --user --upgrade scons protobuf grpcio-tools pyinstaller
          python3 -c 'import google.protobuf; print(google.protobuf.__file__)'

      - name: Build binary package
        run: |
          cd nanopb
          git clean -dxf
          tools/make_linux_package.sh

      - name: Fingerprint binary
        run: |
          openssl sha256 nanopb/dist/*.tar.gz

      - name: Upload binary
        uses: actions/upload-artifact@v2
        with:
          path: nanopb/dist/*.tar.gz
          name: nanopb-binary-linux

      - name: Test binary package
        run: |
          tar xzf nanopb/dist/*.tar.gz
          cd nanopb-*/tests
          python3 -m SCons

      - name: Test examples
        run: |
          cd nanopb-*/examples
          (cd simple; make; ./simple)
          (cd network_server; make)
          (cd using_union_messages; make)
          (cd cmake_simple; mkdir build; cd build; cmake ..; make)
          (cd cmake_relpath; mkdir build; cd build; cmake ..; make)

  build_windows:
    name: Build binary on Windows 2019
    runs-on: windows-2019

    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v2
        with:
          path: nanopb
          fetch-depth: "0"

      - name: Install dependencies
        shell: bash
        run: |
          python3 -m pip install --user --upgrade scons protobuf grpcio-tools pyinstaller
          python3 -c 'import google.protobuf; print(google.protobuf.__file__)'

      - name: Build binary package
        shell: bash
        run: |
          cd nanopb
          git clean -dxf
          tools/make_windows_package.sh

      - name: Fingerprint binary
        run: |
          openssl sha256 nanopb/dist/*.zip

      - name: Upload binary
        uses: actions/upload-artifact@v2
        with:
          path: nanopb/dist/*.zip
          name: nanopb-binary-windows

      - name: Test binary package
        shell: bash
        run: |
          powershell "Expand-Archive nanopb/dist/*.zip"
          ls
          cd nanopb-*/nanopb-*/tests
          python3 -m SCons

  build_macos:
    name: Build binary on Mac OS X Big Sur 11
    runs-on: macos-11

    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v2
        with:
          path: nanopb
          fetch-depth: "0"

      - name: Install dependencies
        run: |
          python3 -m pip install --user --upgrade scons protobuf grpcio-tools pyinstaller
          python3 -c 'import google.protobuf; print(google.protobuf.__file__)'

      - name: Build binary package
        run: |
          cd nanopb
          git clean -dxf
          tools/make_mac_package.sh

      - name: Fingerprint binary
        run: |
          openssl sha256 nanopb/dist/*.tar.gz

      - name: Upload binary
        uses: actions/upload-artifact@v2
        with:
          path: nanopb/dist/*.tar.gz
          name: nanopb-binary-macos

      - name: Test binary package
        run: |
          tar xzf nanopb/dist/*.tar.gz
          cd nanopb-*/tests
          python3 -m SCons
          cd ../examples/simple
          make
          ./simple