-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ab7e5f
commit 3b7091f
Showing
1 changed file
with
73 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,6 +174,79 @@ jobs: | |
with: | ||
apt-get: ${{ matrix.install }} | ||
|
||
- name: Resolve LLVM Root | ||
id: resolve-llvm-root | ||
run: | | ||
set -x | ||
cd .. | ||
llvm_root=$(pwd)/third-party/llvm-project/install | ||
if [[ ${{ runner.os }} == 'Windows' ]]; then | ||
llvm_root=$(echo "$llvm_root" | sed 's/\\/\//g') | ||
llvm_root=$(echo $llvm_root | sed 's|^/d/|D:/|') | ||
echo "$llvm_root" | ||
fi | ||
echo -E "llvm-root=$llvm_root" >> $GITHUB_OUTPUT | ||
- name: Cached LLVM Binaries | ||
id: llvm-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.resolve-llvm-root.outputs.llvm-root }} | ||
key: ${{ matrix.llvm-cache-key }} | ||
|
||
- name: Download LLVM Binaries | ||
id: llvm-download | ||
if: steps.llvm-cache.outputs.cache-hit != 'true' | ||
run: | | ||
set -x | ||
url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }} | ||
http_status=$(curl -s -o /dev/null -w "%{http_code}" -I "$url") | ||
if [ "$http_status" -eq 200 ]; then | ||
found="true" | ||
echo "found=$found" >> $GITHUB_OUTPUT | ||
curl -L -o ${{ matrix.llvm-archive-filename }} "$url" | ||
install_prefix=$(pwd)/../third-party/llvm-project/install | ||
mkdir -p $install_prefix | ||
if [[ ${{ matrix.llvm-archive-extension }} == '7z' ]]; then | ||
7z x ${{ matrix.llvm-archive-filename }} -o$install_prefix | ||
else | ||
tar -xjf ${{ matrix.llvm-archive-filename }} -C $install_prefix | ||
fi | ||
if [[ $(ls -1 $install_prefix | wc -l) -eq 1 ]]; then | ||
single_dir=$(ls -1 $install_prefix) | ||
if [[ -d $install_prefix/$single_dir ]]; then | ||
mv $install_prefix/$single_dir/* $install_prefix/ | ||
rmdir $install_prefix/$single_dir | ||
fi | ||
fi | ||
else | ||
found="false" | ||
echo "found=$found" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Install LLVM | ||
uses: alandefreitas/cpp-actions/[email protected] | ||
if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true' | ||
with: | ||
cmake-version: '>=3.26' | ||
source-dir: ../third-party/llvm-project/llvm | ||
git-repository: https://github.com/llvm/llvm-project.git | ||
git-tag: ${{ matrix.llvm-hash }} | ||
download-dir: ../third-party/llvm-project | ||
patches: | | ||
./third-party/llvm/CMakePresets.json | ||
./third-party/llvm/CMakeUserPresets.json | ||
build-dir: ${sourceDir}/llvm/build | ||
preset: ${{ matrix.llvm-build-preset }} | ||
build-type: ${{ matrix.build-type }} | ||
cc: ${{ steps.setup-cpp.outputs.cc }} | ||
cxx: ${{ steps.setup-cpp.outputs.cxx }} | ||
generator: Ninja | ||
install: true | ||
install-prefix: ${sourceDir}/../install | ||
run-tests: false | ||
trace-commands: true | ||
|
||
- name: Install Duktape | ||
uses: alandefreitas/cpp-actions/[email protected] | ||
with: | ||
|
@@ -266,79 +339,6 @@ jobs: | |
run-tests: false | ||
trace-commands: true | ||
|
||
- name: Resolve LLVM Root | ||
id: resolve-llvm-root | ||
run: | | ||
set -x | ||
cd .. | ||
llvm_root=$(pwd)/third-party/llvm-project/install | ||
if [[ ${{ runner.os }} == 'Windows' ]]; then | ||
llvm_root=$(echo "$llvm_root" | sed 's/\\/\//g') | ||
llvm_root=$(echo $llvm_root | sed 's|^/d/|D:/|') | ||
echo "$llvm_root" | ||
fi | ||
echo -E "llvm-root=$llvm_root" >> $GITHUB_OUTPUT | ||
- name: Cached LLVM Binaries | ||
id: llvm-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.resolve-llvm-root.outputs.llvm-root }} | ||
key: ${{ matrix.llvm-cache-key }} | ||
|
||
- name: Download LLVM Binaries | ||
id: llvm-download | ||
if: steps.llvm-cache.outputs.cache-hit != 'true' | ||
run: | | ||
set -x | ||
url=https://mrdocs.com/llvm+clang/${{ matrix.llvm-archive-filename }} | ||
http_status=$(curl -s -o /dev/null -w "%{http_code}" -I "$url") | ||
if [ "$http_status" -eq 200 ]; then | ||
found="true" | ||
echo "found=$found" >> $GITHUB_OUTPUT | ||
curl -L -o ${{ matrix.llvm-archive-filename }} "$url" | ||
install_prefix=$(pwd)/../third-party/llvm-project/install | ||
mkdir -p $install_prefix | ||
if [[ ${{ matrix.llvm-archive-extension }} == '7z' ]]; then | ||
7z x ${{ matrix.llvm-archive-filename }} -o$install_prefix | ||
else | ||
tar -xjf ${{ matrix.llvm-archive-filename }} -C $install_prefix | ||
fi | ||
if [[ $(ls -1 $install_prefix | wc -l) -eq 1 ]]; then | ||
single_dir=$(ls -1 $install_prefix) | ||
if [[ -d $install_prefix/$single_dir ]]; then | ||
mv $install_prefix/$single_dir/* $install_prefix/ | ||
rmdir $install_prefix/$single_dir | ||
fi | ||
fi | ||
else | ||
found="false" | ||
echo "found=$found" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Install LLVM | ||
uses: alandefreitas/cpp-actions/[email protected] | ||
if: steps.llvm-cache.outputs.cache-hit != 'true' && steps.llvm-download.outputs.found != 'true' | ||
with: | ||
cmake-version: '>=3.26' | ||
source-dir: ../third-party/llvm-project/llvm | ||
git-repository: https://github.com/llvm/llvm-project.git | ||
git-tag: ${{ matrix.llvm-hash }} | ||
download-dir: ../third-party/llvm-project | ||
patches: | | ||
./third-party/llvm/CMakePresets.json | ||
./third-party/llvm/CMakeUserPresets.json | ||
build-dir: ${sourceDir}/llvm/build | ||
preset: ${{ matrix.llvm-build-preset }} | ||
build-type: ${{ matrix.build-type }} | ||
cc: ${{ steps.setup-cpp.outputs.cc }} | ||
cxx: ${{ steps.setup-cpp.outputs.cxx }} | ||
generator: Ninja | ||
install: true | ||
install-prefix: ${sourceDir}/../install | ||
run-tests: false | ||
trace-commands: true | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
|