1414
1515env :
1616 CARGO_TERM_COLOR : always
17+ LLVM_TARGET : x86_64-unknown-linux-musl
1718
1819jobs :
1920 llvm :
5657 - stable
5758 - beta
5859 - nightly
59- llvm :
60- - 19
61- - source
62- name : rustc=${{ matrix.rust }} llvm=${{ matrix.llvm }}
60+ target :
61+ - x86_64-unknown-linux-musl
62+ name : rustc=${{ matrix.rust }} target=${{ matrix.target }}
6363 needs : llvm
6464
6565 env :
8181 toolchain : ${{ matrix.rust }}
8282 components : rust-src
8383 # TODO: Remove this and run the integration tests on the local machine when they pass on 5.15.
84- targets : aarch64-unknown-linux-musl,x86_64-unknown-linux-musl
84+ targets : ${{ matrix.target }}
8585
8686 - uses : Swatinem/rust-cache@v2
8787
@@ -91,59 +91,36 @@ jobs:
9191 - name : Build (default features, no system LLVM)
9292 run : cargo build
9393
94- - name : Install dependencies
95- if : matrix.rust == 'nightly'
96- # ubuntu-22.04 comes with clang 14[0] which doesn't include support for signed and 64bit
97- # enum values which was added in clang 15[1].
98- #
99- # gcc-multilib provides at least <asm/types.h> which is referenced by libbpf.
100- #
101- # llvm provides llvm-objcopy which is used to build the BTF relocation tests.
102- #
103- # [0] https://github.com/actions/runner-images/blob/ubuntu22/20230724.1/images/linux/Ubuntu2204-Readme.md
104- #
105- # [1] https://github.com/llvm/llvm-project/commit/dc1c43d
106- run : |
107- set -euxo pipefail
108- wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
109- echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main | sudo tee /etc/apt/sources.list.d/llvm.list
110- sudo apt update
111- sudo apt -y install clang gcc-multilib
112-
113- - name : Install LLVM
114- if : matrix.llvm != 'source'
115- run : |
116- set -euxo pipefail
117- wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
118- echo -e deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.llvm }} main | sudo tee /etc/apt/sources.list.d/llvm.list
119-
120- sudo apt update
121- # TODO(vadorovsky): Remove the requirement of libpolly.
122- #
123- # Packages from apt.llvm.org are being built all at once, with one
124- # cmake build with superset of options, then different binaries and
125- # libraries are being included in different packages.
126- #
127- # That results in `llvm-config --libname --link-static` mentioning
128- # libpolly, even if it's not installed. The output of that command is
129- # being used in build.rs of llvm-sys, so building llvm-sys on such
130- # system is complaining about lack of libpolly.
131- #
132- # Hopefully that nightmare goes away once we switch to binstalls and
133- # ditch the system LLVM option.
134- sudo apt -y install llvm-${{ matrix.llvm }}-dev libpolly-${{ matrix.llvm }}-dev
135- echo /usr/lib/llvm-${{ matrix.llvm }}/bin >> $GITHUB_PATH
94+ # - name: Install dependencies
95+ # if: matrix.rust == 'nightly'
96+ # # ubuntu-22.04 comes with clang 14[0] which doesn't include support for signed and 64bit
97+ # # enum values which was added in clang 15[1].
98+ # #
99+ # # gcc-multilib provides at least <asm/types.h> which is referenced by libbpf.
100+ # #
101+ # # llvm provides llvm-objcopy which is used to build the BTF relocation tests.
102+ # #
103+ # # [0] https://github.com/actions/runner-images/blob/ubuntu22/20230724.1/images/linux/Ubuntu2204-Readme.md
104+ # #
105+ # # [1] https://github.com/llvm/llvm-project/commit/dc1c43d
106+ # run: |
107+ # run: |
108+ # set -euxo pipefail
109+ # wget https://ci-artifacts.rust-lang.org/rustc-builds/${{ env.LLVM_SHA }}/rust-dev-nightly-${{ env.LLVM_TARGET }}.tar.xz
110+ # set -euxo pipefail
111+ # wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
112+ # echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main | sudo tee /etc/apt/sources.list.d/llvm.list
113+ # sudo apt update
114+ # sudo apt -y install clang gcc-multilib
136115
137116 - name : Restore LLVM
138- if : matrix.llvm == 'source'
139117 uses : actions/cache/restore@v4
140118 with :
141119 path : llvm-install
142120 key : ${{ needs.llvm.outputs.cache-key }}
143121 fail-on-cache-miss : true
144122
145123 - name : Add LLVM to PATH && LD_LIBRARY_PATH
146- if : matrix.llvm == 'source'
147124 run : |
148125 set -euxo pipefail
149126 echo "${{ github.workspace }}/llvm-install/bin" >> $GITHUB_PATH
0 commit comments