github: Produce artifacts with names that match the actual releases
This commit is contained in:
1 parent
085653b6c8
commit
8abf794331
1 file changed
+30
-9
@@ -21,7 +21,18 @@ jobs:
|
||||
LLVM_VERSION: ${{steps.get-versions.outputs.LLVM_VERSION}}
|
||||
MINGW_W64_VERSION: ${{steps.get-versions.outputs.MINGW_W64_VERSION}}
|
||||
PYTHON_VERSION_MINGW: ${{steps.get-versions.outputs.PYTHON_VERSION_MINGW}}
|
||||
TAG: ${{steps.get-tag.outputs.TAG}}
|
||||
steps:
|
||||
- name: Select build tag
|
||||
id: get-tag
|
||||
run: |
|
||||
if ${{github.event_name == 'schedule'}}; then
|
||||
TAG=nightly
|
||||
else
|
||||
TAG=$(TZ=UTC date +%Y%m%d)
|
||||
fi
|
||||
echo TAG=$TAG >> $GITHUB_OUTPUT
|
||||
cat $GITHUB_OUTPUT
|
||||
- name: Check latest version
|
||||
if: github.event_name == 'schedule'
|
||||
id: get-versions
|
||||
@@ -42,17 +53,21 @@ jobs:
|
||||
env:
|
||||
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
|
||||
MINGW_W64_VERSION: ${{needs.prepare.outputs.MINGW_W64_VERSION}}
|
||||
TAG: ${{needs.prepare.outputs.TAG}}
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install ninja-build
|
||||
./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb
|
||||
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
||||
cd install
|
||||
tar -Jcf ../llvm-mingw-linux.tar.xz llvm-mingw
|
||||
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-$(uname -m)
|
||||
NAME=llvm-mingw-$TAG-ucrt-$DISTRO
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-toolchain
|
||||
path: |
|
||||
llvm-mingw-linux.tar.xz
|
||||
llvm-mingw-*.tar.xz
|
||||
retention-days: 7
|
||||
|
||||
# Build a cross compiler for Linux, targeting Windows, with assertions enabled.
|
||||
@@ -96,6 +111,7 @@ jobs:
|
||||
env:
|
||||
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
|
||||
MINGW_W64_VERSION: ${{needs.prepare.outputs.MINGW_W64_VERSION}}
|
||||
TAG: ${{needs.prepare.outputs.TAG}}
|
||||
run: |
|
||||
brew install ninja
|
||||
# Building with MACOS_REDIST=1 (building universal binaries) without
|
||||
@@ -106,12 +122,14 @@ jobs:
|
||||
MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb
|
||||
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
||||
cd install
|
||||
tar -Jcf ../llvm-mingw-macos.tar.xz llvm-mingw
|
||||
NAME=llvm-mingw-$TAG-ucrt-macos-universal
|
||||
mv llvm-mingw $NAME
|
||||
tar -Jcf ../$NAME.tar.xz $NAME
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-toolchain
|
||||
path: |
|
||||
llvm-mingw-macos.tar.xz
|
||||
llvm-mingw-*.tar.xz
|
||||
retention-days: 7
|
||||
|
||||
# Test building the toolchain on msys2 (in the mingw64 and clang64
|
||||
@@ -174,9 +192,9 @@ jobs:
|
||||
name: linux-toolchain
|
||||
- name: Unpack cross toolchain
|
||||
run: |
|
||||
tar -Jxf llvm-mingw-linux.tar.xz
|
||||
rm llvm-mingw-linux.tar.xz
|
||||
sudo mv llvm-mingw /opt/llvm-mingw
|
||||
tar -Jxf llvm-mingw-*.tar.xz
|
||||
rm llvm-mingw-*.tar.xz
|
||||
sudo mv llvm-mingw* /opt/llvm-mingw
|
||||
echo /opt/llvm-mingw/bin >> $GITHUB_PATH
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
@@ -184,17 +202,20 @@ jobs:
|
||||
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
|
||||
MINGW_W64_VERSION: ${{needs.prepare.outputs.MINGW_W64_VERSION}}
|
||||
PYTHON_VERSION_MINGW: ${{needs.prepare.outputs.PYTHON_VERSION_MINGW}}
|
||||
TAG: ${{needs.prepare.outputs.TAG}}
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install autoconf-archive ninja-build
|
||||
./build-cross-tools.sh /opt/llvm-mingw $(pwd)/install/llvm-mingw-${{matrix.arch}} ${{matrix.arch}} --with-python
|
||||
.github/workflows/store-version.sh install/llvm-mingw-${{matrix.arch}}/versions.txt
|
||||
cd install
|
||||
zip -9rq ../llvm-mingw-${{matrix.arch}}.zip llvm-mingw-${{matrix.arch}}
|
||||
NAME=llvm-mingw-$TAG-ucrt-${{matrix.arch}}
|
||||
mv llvm-mingw-${{matrix.arch}} $NAME
|
||||
zip -9rq ../$NAME.zip $NAME
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows-${{matrix.arch}}-toolchain
|
||||
path: |
|
||||
llvm-mingw-${{matrix.arch}}.zip
|
||||
llvm-mingw-*.zip
|
||||
retention-days: 7
|
||||
|
||||
# Run llvm-mingw's tests on x86_64 (and i686) with the cross-built x86_64
|
||||
|
||||
Reference in new issue
Block a user