14 - '.github/workflows/llvm-tests.yml'
15 - '.github/workflows/llvm-project-tests.yml'
22 - '.github/workflows/llvm-tests.yml'
23 - '.github/workflows/llvm-project-tests.yml'
26 # Skip intermediate builds: always.
27 # Cancel intermediate builds: only if it is a pull request build.
28 group: ${{ github.workflow }}-${{ github.ref }}
29 cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
33 if: github.repository_owner == 'llvm'
34 name: Test llvm,clang,libclc
35 uses: ./.github/workflows/llvm-project-tests.yml
37 build_target: check-all
38 projects: clang;libclc
40 # These need to be separate from the check_all job, becuase there is not enough disk
41 # space to build all these projects on Windows.
43 if: github.repository_owner == 'llvm'
45 uses: ./.github/workflows/llvm-project-tests.yml
51 if: github.repository_owner == 'llvm'
53 uses: ./.github/workflows/llvm-project-tests.yml
55 build_target: check-lld
59 if: github.repository_owner == 'llvm'
60 runs-on: ubuntu-latest
62 BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
63 ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
64 BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
65 LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
66 LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
67 LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
69 - name: Checkout source
70 uses: actions/checkout@v3
74 - name: Get LLVM version
76 uses: llvm/actions/get-llvm-version@main
78 - name: Setup Variables
81 if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 -o ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
82 echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))" >> $GITHUB_OUTPUT
83 echo "ABI_HEADERS=llvm-c" >> $GITHUB_OUTPUT
85 echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.LLVM_VERSION_MAJOR }}" >> $GITHUB_OUTPUT
86 echo "ABI_HEADERS=." >> $GITHUB_OUTPUT
90 if: github.repository_owner == 'llvm'
92 runs-on: ubuntu-latest
99 - name: build-baseline
100 llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
101 ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0
102 repo: llvm/llvm-project
104 llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
105 ref: ${{ github.sha }}
106 repo: ${{ github.repository }}
108 - name: Install Ninja
109 uses: llvm/actions/install-ninja@main
110 - name: Install abi-compliance-checker
112 sudo apt-get install abi-dumper autoconf pkg-config
113 - name: Install universal-ctags
115 git clone https://github.com/universal-ctags/ctags.git
120 - name: Download source code
121 uses: llvm/actions/get-llvm-project-src@main
123 ref: ${{ matrix.ref }}
124 repo: ${{ matrix.repo }}
128 cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g1 -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g1 -Og" -DCMAKE_INSTALL_PREFIX=$(pwd)/install llvm
130 # Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
132 ninja -C build install-LLVM
133 ninja -C build install-LLVM
134 ninja -C build install-llvm-headers
137 if [ "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c" ]; then
138 nm ./install/lib/libLLVM.so | awk "/T _LLVM/ || /T LLVM/ { print $3 }" | sort -u | sed -e "s/^_//g" | cut -d ' ' -f 3 > llvm.symbols
139 # Even though the -symbols-list option doesn't seem to filter out the symbols, I believe it speeds up processing, so I'm leaving it in.
140 export EXTRA_ARGS="-symbols-list llvm.symbols"
144 abi-dumper $EXTRA_ARGS -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so
145 # Remove symbol versioning from dumps, so we can compare across major versions.
146 sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' ${{ matrix.ref }}.abi
147 - name: Upload ABI file
148 uses: actions/upload-artifact@v3
150 name: ${{ matrix.name }}
151 path: ${{ matrix.ref }}.abi
153 - name: Upload symbol list file
154 if: matrix.name == 'build-baseline'
155 uses: actions/upload-artifact@v3
161 if: github.repository_owner == 'llvm'
162 runs-on: ubuntu-latest
167 - name: Download baseline
168 uses: actions/download-artifact@v3
171 - name: Download latest
172 uses: actions/download-artifact@v3
175 - name: Download symbol list
176 uses: actions/download-artifact@v3
180 - name: Install abi-compliance-checker
181 run: sudo apt-get install abi-compliance-checker
184 if [ -s symbol-list/llvm.symbols ]; then
185 # This option doesn't seem to work with the ABI dumper, so passing it here.
186 export EXTRA_ARGS="-symbols-list symbol-list/llvm.symbols"
188 # FIXME: Reading of gzip'd abi files on the GitHub runners stop
189 # working some time in March of 2021, likely due to a change in the
190 # runner's environment.
191 abi-compliance-checker $EXTRA_ARGS -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c"
192 - name: Upload ABI Comparison
194 uses: actions/upload-artifact@v3
196 name: compat-report-${{ github.sha }}
197 path: compat_reports/