@@ -44,18 +44,14 @@ jobs:
4444 contracts : ["none", "gsl-lite", "ms-gsl"]
4545 std : [20, 23]
4646 config :
47- # - {
48- # name: "MSVC 14.2",
49- # os: windows-2019,
50- # compiler: { type: VISUAL, version: 16, cc: "", cxx: "" },
51- # conan-config: "-c user.mp-units.build:skip_la=True",
52- # }
53- # - {
54- # name: "MSVC 14.3",
55- # os: windows-2022,
56- # compiler: { type: MSVC, version: 193, cc: "", cxx: "" },
57- # conan-config: "",
58- # }
47+ - {
48+ name : " MSVC 14.4" ,
49+ os : windows-2022,
50+ compiler : { type: MSVC, version: 194, cc: "", cxx: "" },
51+ cxx_modules : " False" ,
52+ std_format_support : " True" ,
53+ conan-config : " " ,
54+ }
5955 - {
6056 name : " GCC-12" ,
6157 os : ubuntu-24.04,
@@ -143,6 +139,20 @@ jobs:
143139 std_format_support : " True" ,
144140 conan-config : " " ,
145141 }
142+ - {
143+ name : " Clang-18 on Apple M1 (arm64)" ,
144+ os : macos-14,
145+ compiler :
146+ {
147+ type : CLANG,
148+ version : 18,
149+ cc : " /opt/homebrew/opt/llvm@18/bin/clang-18" ,
150+ cxx : " /opt/homebrew/opt/llvm@18/bin/clang++" ,
151+ },
152+ lib : " libc++" ,
153+ cxx_modules : " False" ,
154+ std_format_support : " True"
155+ }
146156 - {
147157 name : " Apple Clang 15" ,
148158 os : macos-13,
@@ -168,7 +178,9 @@ jobs:
168178
169179 steps :
170180 - uses : actions/checkout@v4
171- - run : echo "cache_id=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV
181+ - name : Generate unique cache id
182+ shell : bash
183+ run : echo "cache_id=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV
172184 - name : Cache Conan data
173185 uses : actions/cache@v4
174186 if : always()
@@ -196,17 +208,22 @@ jobs:
196208 shell : bash
197209 run : |
198210 sudo apt install -y g++-${{ matrix.config.compiler.version }}
199- - name : Install Clang
200- if : matrix.config.compiler.type == 'CLANG'
211+ - name : Install Clang with apt
212+ if : matrix.config.compiler.type == 'CLANG' && matrix.config.os != 'macos-14'
201213 shell : bash
202214 working-directory : ${{ env.HOME }}
203215 run : |
204216 wget https://apt.llvm.org/llvm.sh
205217 chmod +x llvm.sh
206218 sudo ./llvm.sh ${{ matrix.config.compiler.version }}
207219 sudo apt install -y clang-tools-${{ matrix.config.compiler.version }}
220+ - name : Install Clang using homebrew
221+ if : matrix.config.compiler.type == 'CLANG' && matrix.config.os == 'macos-14'
222+ shell : bash
223+ run : |
224+ brew install llvm@18
208225 - name : Install Libc++
209- if : matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
226+ if : matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++' && matrix.config.os != 'macos-14'
210227 shell : bash
211228 run : |
212229 sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev libunwind-${{ matrix.config.compiler.version }}-dev
@@ -237,14 +254,25 @@ jobs:
237254 sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.std }}/' ~/.conan2/profiles/default
238255 sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.build_type }}/' ~/.conan2/profiles/default
239256 conan profile show -pr default
240- - run : echo "std_format=$([ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
241- - run : echo "import_std=$([ "${{ matrix.config.cxx_modules }}" == "True" ] && [ "${{ matrix.config.contracts }}" == "none" ] && [ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
257+ - name : Set 'std_format' and 'import_std' environment variables
258+ shell : bash
259+ run : |
260+ echo "std_format=$([ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
261+ echo "import_std=$([ "${{ matrix.config.cxx_modules }}" == "True" ] && [ "${{ matrix.config.contracts }}" == "none" ] && [ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
242262 - name : Create Conan package
263+ if : matrix.config.compiler.type != 'MSVC'
243264 shell : bash
244265 run : |
245266 conan create . --user mpusz --channel ${CHANNEL} --lockfile-out=package.lock \
246267 -b mp-units/* -b missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -c user.mp-units.build:all=True \
247268 -o '&:cxx_modules=${{ matrix.config.cxx_modules }}' -o '&:import_std=${{ env.import_std }}' -o '&:std_format=${{ env.std_format }}' -o '&:contracts=${{ matrix.contracts }}' ${{ matrix.config.conan-config }}
269+ - name : Create Conan package
270+ if : matrix.config.compiler.type == 'MSVC'
271+ shell : bash
272+ run : |
273+ conan create . --user mpusz --channel ${CHANNEL} --lockfile-out=package.lock \
274+ -b mp-units/* -b missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -c user.mp-units.build:all=False \
275+ -o '&:cxx_modules=${{ matrix.config.cxx_modules }}' -o '&:import_std=${{ env.import_std }}' -o '&:std_format=${{ env.std_format }}' -o '&:contracts=${{ matrix.contracts }}' ${{ matrix.config.conan-config }}
248276 - name : Obtain package reference
249277 id : get-package-ref
250278 shell : bash
0 commit comments