|
1 | 1 | # Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> |
2 | 2 | # Licensed under Apache License Version 2.0 |
3 | 3 |
|
4 | | -name: Build on Linux/macOS |
| 4 | +name: Build on Linux |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | pull_request: |
|
37 | 37 | clang_repo_suffix: null |
38 | 38 | make: bmake |
39 | 39 | runs-on: ubuntu-22.04 |
40 | | - - cc: gcc-12 |
41 | | - clang_major_version: null |
42 | | - clang_repo_suffix: null |
43 | | - make: make |
44 | | - runs-on: macos-12 |
45 | | - - cc: gcc-13 |
46 | | - clang_major_version: null |
47 | | - clang_repo_suffix: null |
48 | | - make: bmake |
49 | | - runs-on: macos-12 |
50 | | - - cc: clang-15 |
51 | | - clang_major_version: 15 |
52 | | - clang_repo_suffix: null |
53 | | - make: bsdmake |
54 | | - runs-on: macos-12 |
55 | 40 | steps: |
56 | 41 | - name: Add Clang/LLVM repositories |
57 | 42 | if: "${{ runner.os == 'Linux' && contains(matrix.cc, 'clang') }}" |
|
71 | 56 | musl-tools \ |
72 | 57 | pkg-config |
73 | 58 |
|
74 | | - - name: Install build dependencies |
75 | | - if: "${{ runner.os == 'macOS' }}" |
76 | | - run: |- |
77 | | - brew install \ |
78 | | - bmake \ |
79 | | - bsdmake \ |
80 | | - coreutils |
81 | 59 |
|
82 | 60 | - name: Install build dependency Clang ${{ matrix.clang_major_version }} |
83 | 61 | if: "${{ runner.os == 'Linux' && contains(matrix.cc, 'clang') }}" |
|
86 | 64 | clang-${{ matrix.clang_major_version }} \ |
87 | 65 | libclang-rt-${{ matrix.clang_major_version }}-dev |
88 | 66 |
|
89 | | - - name: Add versioned aliases for Clang ${{ matrix.clang_major_version }} |
90 | | - if: "${{ runner.os == 'macOS' && contains(matrix.cc, 'clang') }}" |
91 | | - run: |- |
92 | | - set -x |
93 | | - sudo ln -s "$(brew --prefix llvm@${{ matrix.clang_major_version }})"/bin/clang /usr/local/bin/clang-${{ matrix.clang_major_version }} |
94 | | - sudo ln -s "$(brew --prefix llvm@${{ matrix.clang_major_version }})"/bin/clang++ /usr/local/bin/clang++-${{ matrix.clang_major_version }} |
95 | 67 |
|
96 | 68 | - name: Checkout Git branch |
97 | 69 | uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
@@ -143,13 +115,7 @@ jobs: |
143 | 115 | run: |- |
144 | 116 | set -x |
145 | 117 |
|
146 | | - # macOS default linker does not seem to support --as-needed, |
147 | | - # would error out saying "ld: unknown option: --as-needed" |
148 | | - if [[ ${{ runner.os }} = macOS ]]; then |
149 | | - as_needed= |
150 | | - else |
151 | | - as_needed='-Wl,--as-needed' |
152 | | - fi |
| 118 | + as_needed='-Wl,--as-needed' |
153 | 119 |
|
154 | 120 | # musl-gcc does not seem to support linking with sanitizers |
155 | 121 | if [[ ${{ matrix.cc }} =~ musl ]]; then |
|
0 commit comments