Skip to content

Commit 2ed6e2a

Browse files
committed
CI hacks
1 parent 8ee5325 commit 2ed6e2a

10 files changed

+47
-809
lines changed

.github/workflows/build.yml

+10-512
Large diffs are not rendered by default.

.github/workflows/msvcrt.yml

+1-82
Original file line numberDiff line numberDiff line change
@@ -84,92 +84,11 @@ jobs:
8484
llvm-mingw-*.tar.xz
8585
retention-days: 7
8686

87-
linux-cross-windows:
88-
needs: [linux-msvcrt, prepare]
89-
runs-on: ubuntu-latest
90-
strategy:
91-
fail-fast: false
92-
matrix:
93-
include:
94-
- { arch: i686, crt: msvcrt }
95-
- { arch: x86_64, crt: msvcrt }
96-
steps:
97-
- uses: actions/download-artifact@v3
98-
with:
99-
name: linux-${{matrix.crt}}-x86_64-toolchain
100-
- name: Unpack cross toolchain
101-
run: |
102-
tar -Jxf llvm-mingw-*.tar.xz
103-
rm llvm-mingw-*.tar.xz
104-
sudo mv llvm-mingw* /opt/llvm-mingw
105-
echo /opt/llvm-mingw/bin >> $GITHUB_PATH
106-
- uses: actions/checkout@v3
107-
with:
108-
ref: ${{ (inputs.commit != '' && inputs.commit) || inputs.branch }}
109-
- name: Build
110-
env:
111-
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
112-
MINGW_W64_VERSION: ${{needs.prepare.outputs.MINGW_W64_VERSION}}
113-
PYTHON_VERSION_MINGW: ${{needs.prepare.outputs.PYTHON_VERSION_MINGW}}
114-
TAG: ${{needs.prepare.outputs.TAG}}
115-
run: |
116-
sudo apt-get update && sudo apt-get install autoconf-archive ninja-build
117-
./build-cross-tools.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw ${{matrix.arch}} --with-python
118-
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
119-
cd install
120-
NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
121-
mv llvm-mingw $NAME
122-
zip -9rq ../$NAME.zip $NAME
123-
- uses: actions/upload-artifact@v3
124-
with:
125-
name: windows-${{matrix.crt}}-${{matrix.arch}}-toolchain
126-
path: |
127-
llvm-mingw-*.zip
128-
retention-days: 7
129-
130-
# Run llvm-mingw's tests on x86_64 and i686 with the cross-built corresponding
131-
# toolchains from above.
132-
test-toolchain:
133-
needs: [linux-cross-windows]
134-
runs-on: windows-latest
135-
defaults:
136-
run:
137-
shell: msys2 {0}
138-
strategy:
139-
fail-fast: false
140-
matrix:
141-
include:
142-
- { arch: i686, crt: msvcrt }
143-
- { arch: x86_64, crt: msvcrt }
144-
steps:
145-
- uses: msys2/setup-msys2@v2
146-
with:
147-
msystem: mingw64
148-
install: >-
149-
unzip
150-
make
151-
- uses: actions/download-artifact@v3
152-
with:
153-
name: windows-${{matrix.crt}}-${{matrix.arch}}-toolchain
154-
- name: Unpack toolchain
155-
run: |
156-
unzip -q llvm-mingw-*.zip
157-
rm llvm-mingw-*.zip
158-
mv llvm-mingw-* /llvm-mingw
159-
echo /llvm-mingw/bin >> $GITHUB_PATH
160-
- uses: actions/checkout@v3
161-
with:
162-
ref: ${{ (inputs.commit != '' && inputs.commit) || inputs.branch }}
163-
- name: Run tests
164-
run: |
165-
./run-tests.sh /llvm-mingw
166-
./run-lldb-tests.sh /llvm-mingw
167-
16887
upload:
16988
if: ${{inputs.upload}}
17089
permissions:
17190
contents: write
172-
needs: [linux-msvcrt, linux-cross-windows, test-toolchain, prepare]
91+
needs: [linux-msvcrt, prepare]
17392
runs-on: ubuntu-latest
17493
steps:
17594
- name: Download all artifacts

.github/workflows/release.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ jobs:
4848
- name: Rearrange files
4949
run: |
5050
rm -rf linux-asserts*
51-
mv *-toolchain/*.zip *-toolchain/*.tar.xz .
51+
mv *-toolchain/* .
52+
unzip *.zip || true
53+
find .
5254
- name: Set environment
5355
run: |
5456
cat parameters/parameters.txt >> $GITHUB_ENV
@@ -65,7 +67,7 @@ jobs:
6567
fi
6668
cd repo
6769
git config --global user.name "GitHub Actions"
68-
git config --global user.email [email protected]
70+
git config --global user.email [email protected]
6971
git tag -a ${{inputs.tag}} -m "${{inputs.title}}"
7072
# If the commit isn't the tip of a branch, and there are
7173
# differences in workflow files compared with the tip of the
@@ -83,7 +85,7 @@ jobs:
8385
prerelease="--prerelease"
8486
fi
8587
if ${{inputs.create_release}}; then
86-
gh release create ${{inputs.tag}} --verify-tag $prerelease --title "${{inputs.title}}" --notes "" *.tar.xz *.zip -R ${{github.repository}}
88+
gh release create ${{inputs.tag}} $prerelease --title "${{inputs.title}}" --notes "" *.tar.xz -R ${{github.repository}}
8789
else
88-
gh release upload ${{inputs.tag}} *.tar.xz *.zip --clobber -R ${{github.repository}}
90+
gh release upload ${{inputs.tag}} *.tar.xz --clobber -R ${{github.repository}}
8991
fi

.github/workflows/test-libcxx.yml

-101
This file was deleted.

.github/workflows/test-llvm.yml

-93
This file was deleted.

build-all.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LLVM_ARGS=""
2020
MINGW_ARGS=""
2121
export CFGUARD_ARGS="--disable-cfguard"
2222
HOST_ARGS=""
23-
export TOOLCHAIN_ARCHS=arm64ec
23+
export TOOLCHAIN_ARCHS="arm64ec x86_64 i686"
2424
while [ $# -gt 0 ]; do
2525
case "$1" in
2626
--enable-asserts)
@@ -91,12 +91,12 @@ done
9191

9292
if [ -z "$NO_TOOLS" ]; then
9393
./build-llvm.sh $PREFIX $LLVM_ARGS $HOST_ARGS
94-
if [ -z "$NO_LLDB" ] && [ -z "$NO_LLDB_MI" ]; then
95-
./build-lldb-mi.sh $PREFIX $HOST_ARGS
96-
fi
97-
if [ -z "$FULL_LLVM" ]; then
98-
./strip-llvm.sh $PREFIX $HOST_ARGS
99-
fi
94+
# if [ -z "$NO_LLDB" ] && [ -z "$NO_LLDB_MI" ]; then
95+
# ./build-lldb-mi.sh $PREFIX $HOST_ARGS
96+
# fi
97+
# if [ -z "$FULL_LLVM" ]; then
98+
# ./strip-llvm.sh $PREFIX $HOST_ARGS
99+
# fi
100100
./install-wrappers.sh $PREFIX $HOST_ARGS
101101
./build-mingw-w64-tools.sh $PREFIX $HOST_ARGS
102102
fi

build-llvm.sh

+2-9
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
9999
# (Redoing a shallow fetch will refetch the data even if the commit
100100
# already exists locally, unless fetching a tag with the "tag"
101101
# argument.)
102-
if git cat-file -e "$LLVM_VERSION" 2> /dev/null; then
103-
# Exists; just check it out
104-
git checkout "$LLVM_VERSION"
105-
else
106102
case "$LLVM_VERSION" in
107103
llvmorg-*)
108104
# If $LLVM_VERSION looks like a tag, fetch it with the
@@ -117,7 +113,6 @@ if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
117113
git checkout FETCH_HEAD
118114
;;
119115
esac
120-
fi
121116
cd ..
122117
fi
123118

@@ -307,12 +302,10 @@ cmake \
307302
${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \
308303
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
309304
-DCMAKE_BUILD_TYPE=Release \
310-
-DLLVM_ENABLE_ASSERTIONS=$ASSERTS \
311305
-DLLVM_ENABLE_PROJECTS="$PROJECTS" \
312-
-DLLVM_TARGETS_TO_BUILD="ARM;AArch64;X86;NVPTX" \
313-
-DLLVM_INSTALL_TOOLCHAIN_ONLY=$TOOLCHAIN_ONLY \
306+
-DLLVM_ENABLE_ASSERTIONS=$ASSERTS \
307+
-DLLVM_USE_SYMLINKS=False \
314308
-DLLVM_LINK_LLVM_DYLIB=$LINK_DYLIB \
315-
-DLLVM_TOOLCHAIN_TOOLS="llvm-ar;llvm-lib;llvm-ranlib;llvm-objdump;llvm-rc;llvm-cvtres;llvm-nm;llvm-strings;llvm-readobj;llvm-dlltool;llvm-pdbutil;llvm-objcopy;llvm-strip;llvm-cov;llvm-profdata;llvm-addr2line;llvm-symbolizer;llvm-windres;llvm-ml;llvm-readelf;llvm-size;llvm-cxxfilt" \
316309
${HOST+-DLLVM_HOST_TRIPLE=$HOST} \
317310
$CMAKEFLAGS \
318311
..

install-wrappers.sh

+5
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,8 @@ if [ -n "$EXEEXT" ]; then
145145
;;
146146
esac
147147
fi
148+
149+
ln -sf llvm-strip strip
150+
ln -sf llvm-objcopy objcopy
151+
ln -sf ar-wrapper.sh ar
152+
ln -sf llvm-ranlib ranlib

prepare-cross-toolchain-unix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
SRC="$1"
2424
DEST="$2"
2525

26-
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
26+
: ${ARCHS:=${TOOLCHAIN_ARCHS-arm64ec}}
2727

2828
CLANG_RESOURCE_DIR="$("$SRC/bin/clang" --print-resource-dir)"
2929
CLANG_VERSION=$(basename "$CLANG_RESOURCE_DIR")

0 commit comments

Comments
 (0)