Debian Codegraph @

.github/workflows/build.yml

raw
1 name: Build
2
3 on: [ push, pull_request ]
4
5 jobs:
6
7 dist:
8 name: Package
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v3
12 - name: Configure
13 run: |
14 ./bootstrap.sh
15 ./configure
16 - name: Make source package
17 run: make VERSION=${{ github.sha }} dist
18 - name: Upload source package artifact
19 uses: actions/upload-artifact@v4
20 with:
21 name: bzip3-${{ github.sha }}
22 path: bzip3-${{ github.sha }}.tar.gz
23 - name: Run distcheck
24 run: make distcheck
25
26 build:
27 name: Build Matrix
28 needs: [ dist ]
29 strategy:
30 fail-fast: false
31 matrix:
32 platform: [ ubuntu-latest, macos-latest ]
33 compiler: [ clang, gcc ]
34 feature: [ with-pthread, without-pthread ]
35 runs-on: ${{ matrix.platform }}
36 steps:
37 - name: Download source package artifact
38 uses: actions/download-artifact@v4
39 with:
40 name: bzip3-${{ github.sha }}
41 - name: Extract source package
42 run: tar --strip-components=1 -xf bzip3-${{ github.sha}}.tar.gz
43 - name: Fetch examples
44 run: |
45 mkdir examples
46 cd examples
47 wget https://github.com/iczelia/bzip3/raw/${{ github.sha }}/examples/shakespeare.txt \
48 https://github.com/iczelia/bzip3/raw/${{ github.sha }}/examples/shakespeare.txt.bz3
49 - name: Configure
50 run: ./configure CC=${{ matrix.compiler }} --${{ matrix.feature }}
51 - name: Make
52 run: make
53 - name: Check
54 run: make roundtrip test
55
56 build-archs:
57 name: Build Matrix for non-x86 architectures (Debian Bookworm)
58 needs: [ dist ]
59 strategy:
60 fail-fast: false
61 matrix:
62 compiler: [ clang, gcc ]
63 feature: [ with-pthread, without-pthread ]
64 arch: [ armv6, armv7, aarch64, s390x, ppc64le ]
65 runs-on: ubuntu-latest
66 steps:
67 - name: Download source package artifact
68 uses: actions/download-artifact@v4
69 with:
70 name: bzip3-${{ github.sha }}
71 - name: Extract source package
72 run: tar --strip-components=1 -xf bzip3-${{ github.sha}}.tar.gz
73 - name: Fetch examples
74 run: |
75 mkdir examples
76 cd examples
77 wget https://github.com/iczelia/bzip3/raw/${{ github.sha }}/examples/shakespeare.txt \
78 https://github.com/iczelia/bzip3/raw/${{ github.sha }}/examples/shakespeare.txt.bz3
79 - uses: uraimo/run-on-arch-action@v2
80 name: Run in the container
81 with:
82 arch: ${{ matrix.arch }}
83 distro: bookworm
84 shell: /bin/sh
85 dockerRunArgs: |
86 --volume "${PWD}:/bzip3"
87 install: |
88 apt update -q -y
89 apt install -q -y clang gcc make
90 run: |
91 cd /bzip3
92 ./configure CC=${{ matrix.compiler }} --${{ matrix.feature }} --disable-arch-native --disable-link-time-optimization
93 make && make roundtrip test
94 build-archs-ubuntu:
95 name: Build Matrix for non-x86 architectures (Ubuntu Latest)
96 needs: [ dist ]
97 strategy:
98 fail-fast: false
99 matrix:
100 compiler: [ clang, gcc ]
101 feature: [ with-pthread, without-pthread ]
102 arch: [ riscv64 ]
103 runs-on: ubuntu-latest
104 steps:
105 - name: Download source package artifact
106 uses: actions/download-artifact@v4
107 with:
108 name: bzip3-${{ github.sha }}
109 - name: Extract source package
110 run: tar --strip-components=1 -xf bzip3-${{ github.sha}}.tar.gz
111 - name: Fetch examples
112 run: |
113 mkdir examples
114 cd examples
115 wget https://github.com/iczelia/bzip3/raw/${{ github.sha }}/examples/shakespeare.txt \
116 https://github.com/iczelia/bzip3/raw/${{ github.sha }}/examples/shakespeare.txt.bz3
117 - uses: uraimo/run-on-arch-action@v2
118 name: Run in the container
119 with:
120 arch: ${{ matrix.arch }}
121 distro: ubuntu_latest
122 shell: /bin/sh
123 dockerRunArgs: |
124 --volume "${PWD}:/bzip3"
125 install: |
126 apt update -q -y
127 apt install -q -y clang gcc make
128 run: |
129 cd /bzip3
130 ./configure CC=${{ matrix.compiler }} --${{ matrix.feature }} --disable-arch-native --disable-link-time-optimization
131 make && make roundtrip test
132
133 cmake:
134 name: Build with CMake
135 runs-on: ubuntu-latest
136 steps:
137 - uses: actions/checkout@v3
138 - name: CMake
139 run: cmake -B build
140 - name: Make
141 run: make -C build