Skip to content

Commit 5e6b401

Browse files
committed
[slightly revise]
1 parent b95a910 commit 5e6b401

File tree

17 files changed

+67
-54
lines changed

17 files changed

+67
-54
lines changed

.github/actions/1-setup/action.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 1-setup
1+
name: Install prerequisites
22
inputs:
33
clang_version:
44
required: true
@@ -9,6 +9,7 @@ inputs:
99
runs:
1010
using: composite
1111
steps:
12+
1213
- name: 'Linux: Install required apt packages'
1314
if: runner.os == 'Linux'
1415
shell: bash
@@ -32,6 +33,7 @@ runs:
3233
curl -fL --retry 3 --max-time 300 -o clang.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ inputs.clang_version }}/clang+llvm-${{ inputs.clang_version }}-x86_64-linux-gnu-ubuntu-18.04.tar.xz
3334
mkdir clang
3435
tar -xf clang.tar.xz --strip 1 -C clang
36+
rm clang.tar.xz
3537
clang/bin/clang --version
3638
- name: 'Windows: Install clang'
3739
if: runner.os == 'Windows'
@@ -41,6 +43,7 @@ runs:
4143
cd ..
4244
curl -fL --retry 3 --max-time 300 -o clang.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ inputs.clang_version }}/LLVM-${{ inputs.clang_version }}-win64.exe
4345
./clang.exe //S # double-slash for bash
46+
rm clang.exe
4447
# C:\Program Files\LLVM\bin should already be in PATH
4548
clang-cl --version
4649
@@ -71,6 +74,7 @@ runs:
7174
mkdir llvm
7275
cd llvm
7376
7z x ../llvm.7z >/dev/null
77+
rm ../llvm.7z
7478
cd ..
7579
else
7680
if [[ '${{ runner.os }}' == Linux ]]; then
@@ -81,6 +85,7 @@ runs:
8185
curl -fL --retry 3 --max-time 300 -o llvm.tar.xz https://github.com/ldc-developers/llvm-project/releases/download/$tag/llvm-$version-$os-$arch$assertsSuffix.tar.xz
8286
mkdir llvm
8387
tar -xf llvm.tar.xz --strip 1 -C llvm
88+
rm llvm.tar.xz
8489
fi
8590
8691
llvm/bin/llvm-config --version
@@ -100,7 +105,7 @@ runs:
100105
uses: dlang-community/setup-dlang@v1.0.6
101106
with:
102107
compiler: ldc-latest
103-
- name: 'Posix: Clear LD_LIBRARY_PATH env variable'
108+
- name: 'Posix: Clear LD_LIBRARY_PATH env variable' # don't use host druntime/Phobos .so/.dylib etc.
104109
if: runner.os != 'Windows'
105110
shell: bash
106111
run: echo "LD_LIBRARY_PATH=" >> $GITHUB_ENV
@@ -117,7 +122,7 @@ runs:
117122
# the druntime tests require GNU make
118123
- name: 'Windows: Make sure GNU make is installed'
119124
if: runner.os == 'Windows'
120-
shell: bash
125+
shell: cmd
121126
run: make --version
122127

123128
- name: 'Windows: Download & extract libcurl' # into ../libcurl/ldc2
@@ -130,6 +135,7 @@ runs:
130135
mkdir libcurl
131136
cd libcurl
132137
7z x ../libcurl.7z >/dev/null
138+
rm ../libcurl.7z
133139
mkdir ldc2
134140
if [[ '${{ inputs.arch }}' == x64 ]]; then
135141
cp dmd2/windows/bin64/libcurl.dll ldc2/
@@ -140,7 +146,7 @@ runs:
140146
fi
141147
ls -lh ldc2/
142148
143-
- name: 'Windows: Set LDC_VSDIR env variable'
149+
- name: 'Windows: Set LDC_VSDIR env variable' # to somewhat speed-up MSVC auto-detection
144150
if: runner.os == 'Windows'
145151
shell: bash
146152
run: echo "LDC_VSDIR=$(vswhere -latest -property installationPath)" >> $GITHUB_ENV

.github/actions/2-build-bootstrap/action.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 2-build-bootstrap
1+
name: Build bootstrap LDC
22
inputs:
33
cmake_flags:
44
required: false
@@ -8,17 +8,15 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11-
- shell: bash
12-
run: |
13-
cmake --version
14-
ninja --version
1511

1612
- name: 'Posix: Build bootstrap LDC'
1713
if: runner.os != 'Windows'
1814
shell: bash
1915
run: |
2016
set -eux
2117
cd ..
18+
cmake --version
19+
ninja --version
2220
mkdir bootstrap-ldc
2321
cd bootstrap-ldc
2422
cmake -G Ninja ../ldc \

.github/actions/3-build-cross/action.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 3-build-cross
1+
name: Cross-compile LDC to ${{ inputs.os }}-${{ inputs.arch }}
22
inputs:
33
arch:
44
required: true
@@ -19,7 +19,7 @@ runs:
1919
using: composite
2020
steps:
2121

22-
- name: Download & extract LDC-flavoured LLVM for ${{ inputs.os }}/${{ inputs.arch }} target # into ../llvm-cross
22+
- name: Download & extract LDC-flavoured LLVM for ${{ inputs.os }}-${{ inputs.arch }} target # into ../llvm-cross
2323
shell: bash
2424
run: |
2525
set -eux
@@ -56,6 +56,7 @@ runs:
5656
cp llvm/bin/llvm-config llvm-cross/bin/
5757
fi
5858
59+
# set up DFLAGS to make bootstrap ldmd2 cross-compile/link
5960
- name: 'macOS: Set DFLAGS, CROSS_TRIPLE & CROSS_CMAKE_FLAGS'
6061
if: inputs.os == 'osx'
6162
shell: bash
@@ -68,7 +69,7 @@ runs:
6869
echo "CROSS_TRIPLE=$triple" >> $GITHUB_ENV
6970
echo "CROSS_CMAKE_FLAGS=-DCMAKE_OSX_ARCHITECTURES=$arch" >> $GITHUB_ENV
7071
71-
- name: 'Android: Download & extract NDK; set DFLAGS, CROSS_TRIPLE & CROSS_CMAKE_FLAGS'
72+
- name: 'Android: Download & extract NDK, then set DFLAGS, CROSS_TRIPLE & CROSS_CMAKE_FLAGS'
7273
if: inputs.os == 'android'
7374
shell: bash
7475
run: |

.github/actions/3-build-native/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 3-build-native
1+
name: Build LDC & LDC D unittests & defaultlib unittest runners
22
inputs:
33
cmake_flags:
44
required: false
@@ -8,6 +8,7 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11+
1112
- name: 'Posix: Build LDC & LDC D unittests & defaultlib unittest runners'
1213
if: runner.os != 'Windows'
1314
shell: bash
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
name: 4a-test-ldc2
1+
name: Run LDC D unittests
22
runs:
33
using: composite
44
steps:
5-
- name: Run LDC D unittests
5+
- run: cd ../build && ctest --output-on-failure -R "ldc2-unittest"
66
shell: bash
7-
run: cd ../build && ctest --output-on-failure -R "ldc2-unittest"

.github/actions/4b-test-lit/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: 4b-test-lit
1+
name: Run LIT testsuite
22
inputs:
33
arch:
44
required: false # Windows only
55
runs:
66
using: composite
77
steps:
8+
89
- name: 'Posix: Run LIT testsuite'
910
if: runner.os != 'Windows'
1011
shell: bash

.github/actions/4c-test-dmd/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: 4c-test-dmd
1+
name: Run DMD testsuite
22
inputs:
33
arch:
44
required: false # Windows only
55
runs:
66
using: composite
77
steps:
8+
89
- name: 'Posix: Run DMD testsuite'
910
if: runner.os != 'Windows'
1011
shell: bash

.github/actions/4d-test-libs/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: 4d-test-libs
1+
name: Run defaultlib unittests & druntime integration tests
22
inputs:
33
arch:
44
required: false # Windows only
55
runs:
66
using: composite
77
steps:
8+
89
- name: 'Posix: Run defaultlib unittests & druntime integration tests'
910
if: runner.os != 'Windows'
1011
shell: bash

.github/actions/5-install/action.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 5-install
1+
name: Install LDC & make portable
22
inputs:
33
arch:
44
required: false # Windows only
@@ -8,11 +8,13 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11+
1112
- name: Install LDC
1213
shell: bash
1314
run: |
1415
set -eux
1516
cd ..
17+
1618
if [[ '${{ inputs.cross_compiling }}' != true ]]; then
1719
cd build
1820
ninja install >/dev/null
@@ -32,6 +34,7 @@ runs:
3234
rm -rf install/import/etc/c/zlib
3335
cp -R ldc/runtime/phobos/std install/import/
3436
fi
37+
3538
cp ldc/LICENSE install/
3639
if [[ '${{ runner.os }}' == Windows ]]; then
3740
cp ldc/packaging/README.txt install/
@@ -70,6 +73,8 @@ runs:
7073
mkdir mingw-w64-libs
7174
cd mingw-w64-libs
7275
7z x ../mingw-w64-libs.7z >/dev/null
76+
rm ../mingw-w64-libs.7z
77+
7378
if [[ '${{ inputs.arch }}' == x86 ]]; then
7479
model=32
7580
else

.github/actions/5a-android-x86/action.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: 5a-android-x86
1+
name: 'Android: Cross-compile ${{ inputs.arch }} libraries & copy to install dir'
22
inputs:
33
arch:
44
required: true
55
runs:
66
using: composite
77
steps:
8-
- name: Cross-compile ${{ inputs.arch }} libraries & copy to install dir
9-
shell: bash
8+
- shell: bash
109
run: |
1110
set -eux
1211
cd ..

.github/actions/5a-ios/action.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 5a-ios
1+
name: 'macOS: Cross-compile iOS libraries, copy to install dir & extend ldc2.conf'
22
inputs:
33
arch:
44
required: true
@@ -8,8 +8,7 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11-
- name: Cross-compile iOS libraries, copy to install dir & extend ldc2.conf
12-
shell: bash
11+
- shell: bash
1312
run: |
1413
set -eux
1514
cd ..

.github/actions/6-integration-test/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
name: 6-integration-test
1+
name: Run a few integration tests against the installed compiler
22
runs:
33
using: composite
44
steps:
5+
56
- name: Generate hello.d
67
shell: bash
78
run: echo 'void main() { import std.stdio; writefln("Hello world, %d bits", size_t.sizeof * 8); }' > ../hello.d

.github/actions/7-package/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 7-package
1+
name: Create package & upload artifact(s)
22
inputs:
33
arch:
44
required: true
@@ -11,6 +11,7 @@ inputs:
1111
runs:
1212
using: composite
1313
steps:
14+
1415
- name: Set DMD environment variable
1516
shell: bash
1617
run: |

.github/actions/merge-macos/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: merge-macos
1+
name: Merge x86_64 & arm64 packages to universal one
22
runs:
33
using: composite
44
steps:

.github/actions/merge-windows/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: merge-windows
1+
name: Merge x64 & x86 packages to multilib one & build installer
22
runs:
33
using: composite
44
steps:
@@ -100,7 +100,7 @@ runs:
100100
"/DLDCDir=%CD%\%ARTIFACT_NAME%" ^
101101
packaging\windows_installer.iss
102102
103-
- name: Upload multilib package and installer
103+
- name: Upload multilib package & installer
104104
uses: actions/upload-artifact@v3
105105
with:
106106
name: windows-multilib

.github/actions/upload-to-github/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: merge-windows
1+
name: Upload to GitHub
22
runs:
33
using: composite
44
steps:

0 commit comments

Comments
 (0)