File: linux.yml

package info (click to toggle)
picolibc 1.8.11-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 50,064 kB
  • sloc: ansic: 404,031; asm: 24,984; sh: 2,585; python: 2,289; perl: 680; pascal: 329; exp: 287; makefile: 222; cpp: 71; xml: 40
file content (298 lines) | stat: -rw-r--r-- 11,630 bytes parent folder | download
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
name: Linux

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
  workflow_dispatch:

# When a PR is updated, cancel the jobs from the previous version. Merges
# do not define head_ref, so use run_id to never cancel those jobs.
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

env:
  DOCKERFILE: picolibc/.github/Dockerfile
  IMAGE_FILE: dockerimg-linux.tar.zst
  IMAGE: picolibc-linux
  PACKAGES_FILE: picolibc/.github/linux-packages.txt
  EXTRA_FILE: picolibc/.github/linux-files.txt

jobs:
  cache-maker:
    runs-on: ubuntu-latest
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Cache the Docker Image
        id: cache
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          lookup-only: true

      - name: Set up Docker Buildx
        if: steps.cache.outputs.cache-hit != 'true'
        uses: docker/setup-buildx-action@v3

      - name: Build picolibc container
        if: steps.cache.outputs.cache-hit != 'true'
        uses: docker/build-push-action@v6
        with:
          platforms: linux/amd64
          file: .github/Dockerfile
          tags: ${{ env.IMAGE }}:latest
          outputs: type=docker,force-compression=true,compression=zstd,compression-level=22,dest=${{ env.IMAGE_FILE }}

  cmake-linux:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cmake_flags: [
          "",
          # optional configurations
          "-D__IO_FLOAT=y -D__IO_FLOAT_EXACT=n -D__IO_LONG_LONG=y -D_MB_CAPABLE=y -D_MB_EXTENDED_CHARSETS_ALL=y -D__IO_POS_ARGS=y -D_WANT_MINIMAL_IO_LONG_LONG=y -D_PRINTF_PERCENT_N=y",
        ]
        test: [
          "./.github/do-cmake-linux -DCMAKE_BUILD_TYPE=RelWithDebInfo",
          "./.github/do-cmake-linux -DCMAKE_BUILD_TYPE=MinSizeRel",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: CMake test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.cmake_flags }}
  minsize-linux-arm:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        meson_flags: [
          "",

          # math configurations, one with multithread disabled and with locale, original malloc and atexit/onexit code
          "-Dio-float-exact=false -Dio-long-long=true -Dio-percent-b=true -Dio-long-double=true -Dnewlib-obsolete-math=false -Dwant-math-errno=true -Dsingle-thread=true -Dmb-capable=true -Dmb-extended-charsets=true -Dprintf-small-ultoa=true -Dprintf-percent-n=true",
          "-Dformat-default=integer -Dfreestanding=true -Dnewlib-obsolete-math=true -Dwant-math-errno=true -Dassert-verbose=false -Dfast-bufio=true -Dstdio-locking=true -Dfstat-bufsiz=true",
        ]
        test: [
          "./.github/do-linux-arm",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: Minsize test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.meson_flags }} --buildtype minsize
  minsize-linux-riscv:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        meson_flags: [
          "",

          # math configurations, one with multithread disabled and with locale, original malloc and atexit/onexit code
          "-Dio-float-exact=false -Dio-long-long=true -Dio-percent-b=true -Dio-long-double=true -Dnewlib-obsolete-math=false -Dwant-math-errno=true -Dsingle-thread=true -Dmb-capable=true -Dmb-extended-charsets=true -Dprintf-small-ultoa=true -Dprintf-percent-n=true",
          "-Dformat-default=integer -Dfreestanding=true -Dnewlib-obsolete-math=true -Dwant-math-errno=true -Dassert-verbose=false -Dfast-bufio=true -Dstdio-locking=true -Dfstat-bufsiz=true",
        ]
        test: [
          "./.github/do-linux-riscv",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: Minsize test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.meson_flags }} --buildtype minsize
  minsize-linux-misc:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        meson_flags: [
          "",

          # math configurations, one with multithread disabled and with locale, original malloc and atexit/onexit code
          "-Dio-float-exact=false -Dio-long-long=true -Dio-percent-b=true -Dio-long-double=true -Dnewlib-obsolete-math=false -Dwant-math-errno=true -Dsingle-thread=true -Dmb-capable=true -Dmb-extended-charsets=true -Dprintf-small-ultoa=true -Dprintf-percent-n=true",
          "-Dformat-default=integer -Dfreestanding=true -Dnewlib-obsolete-math=true -Dwant-math-errno=true -Dassert-verbose=false -Dfast-bufio=true -Dstdio-locking=true -Dfstat-bufsiz=true",
        ]
        test: [
          "./.github/do-linux-misc",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: Minsize test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.meson_flags }} --buildtype minsize
  release-linux-arm:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        meson_flags: [
          "",

          # math configurations, one with multithread disabled and with locale, original malloc and atexit/onexit code
          "-Dio-float-exact=false -Dio-long-long=true -Dio-percent-b=true -Dio-long-double=true -Dnewlib-obsolete-math=false -Dwant-math-errno=true -Dsingle-thread=true -Dmb-capable=true -Dmb-extended-charsets=true -Dprintf-small-ultoa=true -Dprintf-percent-n=true",
          "-Dformat-default=integer -Dfreestanding=true -Dnewlib-obsolete-math=true -Dwant-math-errno=true -Dassert-verbose=false -Dfast-bufio=true -Dstdio-locking=true -Dfstat-bufsiz=true",
        ]
        test: [
          "./.github/do-linux-arm",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: Release test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.meson_flags }} --buildtype release
  release-linux-riscv:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        meson_flags: [
          "",

          # math configurations, one with multithread disabled and with locale, original malloc and atexit/onexit code
          "-Dio-float-exact=false -Dio-long-long=true -Dio-percent-b=true -Dio-long-double=true -Dnewlib-obsolete-math=false -Dwant-math-errno=true -Dsingle-thread=true -Dmb-capable=true -Dmb-extended-charsets=true -Dprintf-small-ultoa=true -Dprintf-percent-n=true",
          "-Dformat-default=integer -Dfreestanding=true -Dnewlib-obsolete-math=true -Dwant-math-errno=true -Dassert-verbose=false -Dfast-bufio=true -Dstdio-locking=true -Dfstat-bufsiz=true",
        ]
        test: [
          "./.github/do-linux-riscv",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: Release test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.meson_flags }} --buildtype release
  release-linux-misc:
    needs: cache-maker
    runs-on: ubuntu-latest
    strategy:
      matrix:
        meson_flags: [
          "",

          # math configurations, one with multithread disabled and with locale, original malloc and atexit/onexit code
          "-Dio-float-exact=false -Dio-long-long=true -Dio-percent-b=true -Dio-long-double=true -Dnewlib-obsolete-math=false -Dwant-math-errno=true -Dsingle-thread=true -Dmb-capable=true -Dmb-extended-charsets=true -Dprintf-small-ultoa=true -Dprintf-percent-n=true",
          "-Dformat-default=integer -Dfreestanding=true -Dnewlib-obsolete-math=true -Dwant-math-errno=true -Dassert-verbose=false -Dfast-bufio=true -Dstdio-locking=true -Dfstat-bufsiz=true",
        ]
        test: [
          "./.github/do-linux-misc",
        ]
    steps:
      - name: Clone picolibc
        uses: actions/checkout@v6
        with:
          path: picolibc

      - name: Restore the Docker Image
        uses: actions/cache@v5
        with:
          path: ${{ env.IMAGE_FILE }}
          key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.DOCKERFILE, env.PACKAGES_FILE, env.EXTRA_FILE ) }}
          fail-on-cache-miss: true

      - name: Load and Check the Docker Image
        run: |
          docker load -i $IMAGE_FILE
          docker images -a $IMAGE
      - name: Release test
        run: |
          docker run -v $(readlink -f picolibc):/picolibc -w /picolibc $IMAGE ${{ matrix.test }} ${{ matrix.meson_flags }} --buildtype release