Skip to content

Commit

Permalink
gh: fix artifact content names for MSVC-like compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
luau-project committed Jun 10, 2024
1 parent 3af7fb5 commit 592ca8f
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 25 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,23 @@ jobs:

steps:

- name: Set environment variables for archive and archive directory
run: |
Add-Content $env:GITHUB_ENV "BINARY_ARCHIVE_SUFFIX=-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like";
Add-Content $env:GITHUB_ENV "ARCHIVE=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like${{ matrix.BINARY_ARCHIVE.ext }}";
Add-Content $env:GITHUB_ENV "ARCHIVE_DIR=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like";
Add-Content $env:GITHUB_ENV "ARCHIVE_MD5=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like${{ matrix.BINARY_ARCHIVE.ext }}-MD5.txt";
Add-Content $env:GITHUB_ENV "ARCHIVE_SHA256=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like${{ matrix.BINARY_ARCHIVE.ext }}-SHA256.txt";
- name: Set environment variables for archive and archive directory (shared-libraries)
if: ${{ matrix.BUILD_SHARED_LIBS=='ON'}}
run: |
Add-Content $env:GITHUB_ENV "BINARY_ARCHIVE_SUFFIX=-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-shared-libs";
Add-Content $env:GITHUB_ENV "ARCHIVE=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-shared-libs${{ matrix.BINARY_ARCHIVE.ext }}";
Add-Content $env:GITHUB_ENV "ARCHIVE_DIR=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-shared-libs";
Add-Content $env:GITHUB_ENV "ARCHIVE_MD5=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-shared-libs${{ matrix.BINARY_ARCHIVE.ext }}-MD5.txt";
Add-Content $env:GITHUB_ENV "ARCHIVE_SHA256=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-shared-libs${{ matrix.BINARY_ARCHIVE.ext }}-SHA256.txt";
- name: Set environment variables for archive and archive directory (static-libraries)
if: ${{ matrix.BUILD_STATIC_LIBS=='ON'}}
run: |
Add-Content $env:GITHUB_ENV "BINARY_ARCHIVE_SUFFIX=-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-static-libs";
Add-Content $env:GITHUB_ENV "ARCHIVE=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-static-libs${{ matrix.BINARY_ARCHIVE.ext }}";
Add-Content $env:GITHUB_ENV "ARCHIVE_DIR=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-static-libs";
Add-Content $env:GITHUB_ENV "ARCHIVE_MD5=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-static-libs${{ matrix.BINARY_ARCHIVE.ext }}-MD5.txt";
Add-Content $env:GITHUB_ENV "ARCHIVE_SHA256=minpack-${{ env.MINPACK_BUILDER_VERSION }}-binaries-win64-${{ matrix.TOOLCHAIN.COMPILER }}-msvc-like-static-libs${{ matrix.BINARY_ARCHIVE.ext }}-SHA256.txt";
- name: Checkout assets
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions cmake/minpack-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ get_filename_component(__Fortran_COMPILER_NAME "${CMAKE_Fortran_COMPILER}" NAME)

if ("${__Fortran_COMPILER_NAME}" MATCHES "ifx|ifort")
if (WIN32)
set(minpack_FORTRAN_FLAGS @minpack_intel_specific_Fflags_for_Win@)
set(minpack_FORTRAN_FLAGS "@minpack_intel_specific_Fflags_for_Win@")
else()
set(minpack_FORTRAN_FLAGS @minpack_intel_specific_Fflags_for_Unix@)
set(minpack_FORTRAN_FLAGS "@minpack_intel_specific_Fflags_for_Unix@")
endif()
endif()

Expand Down Expand Up @@ -139,4 +139,4 @@ if (EXISTS "${_prefix}/@MINPACK_INSTALL_PKGCONFIGDIR@/@[email protected]"
set(minpack_PKGCONFIG_DIR "${_prefix}/@MINPACK_INSTALL_PKGCONFIGDIR@")
endif()

set(minpack_VERSION @MINPACK_VERSION@)
set(minpack_VERSION "@MINPACK_VERSION@")
8 changes: 6 additions & 2 deletions doc/Build-and-Install-on-Linux-GFortran.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For this tutorial, we are going to use Debian 12 stable in a terminal-only fashi
>
> Install them all at once running the following command in the terminal:
> ```bash
> sudo apt install -f -y gfortran git make cmake
> sudo apt install -y gfortran git make cmake
> ```
Check that everything went fine. You should have all these tools installed, and the following commands should suceed:
Expand Down Expand Up @@ -58,7 +58,11 @@ The result on terminal should be more or less like this:
>
> We are going for a local installation at ```/tmp/working_dir/local-install```, building the package at ```/tmp/working_dir/build```.

3. Clone minpack-builder by running ```git clone https://github.com/luau-project/minpack-builder```
3. Clone minpack-builder by running

```bash
git clone https://github.com/luau-project/minpack-builder
```

![Screenshot from 2024-05-03 15-34-52](https://github.com/luau-project/minpack-builder/assets/18295115/0a24bfac-b4df-48cb-932b-8ff1cfe01bfe)

Expand Down
10 changes: 7 additions & 3 deletions doc/Build-and-Install-on-Linux-Intel-Fortran-Compiler-ifx.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For this tutorial, we are going to use Debian 12 stable in a terminal-only fashi
1. First, make sure to have gpg installed. So, install it:

```bash
sudo apt install -f -y gpg
sudo apt install -y gpg
```

2. Confirm that gpg was installed properly:
Expand Down Expand Up @@ -74,7 +74,7 @@ For this tutorial, we are going to use Debian 12 stable in a terminal-only fashi
>
> Install them all at once running the following command in the terminal:
> ```bash
> sudo apt install -f -y intel-basekit intel-hpckit git make cmake
> sudo apt install -y intel-basekit intel-hpckit git make cmake
> ```
> [!IMPORTANT]
Expand Down Expand Up @@ -116,7 +116,11 @@ The result on terminal should be more or less like this:
>
> We are going for a local installation at ```/tmp/ifx_working_dir/local-install-ifx```, building the package at ```/tmp/ifx_working_dir/build-ifx```.
3. Clone minpack-builder by running ```git clone https://github.com/luau-project/minpack-builder```
3. Clone minpack-builder by running
```bash
git clone https://github.com/luau-project/minpack-builder
```
![Screenshot from 2024-05-04 12-43-51](https://github.com/luau-project/minpack-builder/assets/18295115/c2bafde5-9fab-49e6-bb38-85996a91a3bf)
Expand Down
6 changes: 5 additions & 1 deletion doc/Build-and-Install-on-Windows-GFortran.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ You can check that ```winget``` got properly installed if the search command wor
>
> If your ```%homedrive%``` variable points to ```C:```, we are going for a local installation at ```C:\minpack-builder-gfortran-guide\local-install-gfortran```, building the package at ```C:\minpack-builder-gfortran-guide\build-gfortran```.
6. Clone minpack-builder by running ```git clone https://github.com/luau-project/minpack-builder```
6. Clone minpack-builder by running
```cmd
git clone https://github.com/luau-project/minpack-builder
```
![Screenshot from 2024-05-08 08-41-22](https://github.com/luau-project/minpack-builder/assets/18295115/0f3c0f5b-f9e1-4760-b440-9f234a445c2f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
>
> If your ```%homedrive%``` variable points to ```C:```, we are going for a local installation at ```C:\minpack-builder-guide\local-install-ifx```, building the package at ```C:\minpack-builder-guide\build-ifx```.
5. Clone minpack-builder by running ```git clone https://github.com/luau-project/minpack-builder```
5. Clone minpack-builder by running
```cmd
git clone https://github.com/luau-project/minpack-builder
```
![Screenshot from 2024-05-05 17-48-51](https://github.com/luau-project/minpack-builder/assets/18295115/f77c04d4-1beb-47eb-b62b-0d5d9b142330)
Expand Down
20 changes: 12 additions & 8 deletions doc/Build-and-Install-on-Windows-LLVM-Flang-new-MSVC-like.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
conda --version
```
![Screenshot from 2024-06-07 21-05-26](https://github.com/luau-project/minpack-builder/assets/18295115/ba296717-0f2a-4c62-89c6-4850d4934be9)
![Screenshot from 2024-06-07 21-05-26](https://github.com/luau-project/minpack-builder/assets/18295115/ba296717-0f2a-4c62-89c6-4850d4934be9)
4. Create an environment for minpack-builder installing LLVM flang-new (MSVC-like) from ```conda-forge```:
```cmd
Expand All @@ -133,7 +133,7 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
flang-new --version
```
![Screenshot from 2024-06-07 21-21-01](https://github.com/luau-project/minpack-builder/assets/18295115/bab70581-2fb9-4079-b9dd-1a14ec00aca5)
![Screenshot from 2024-06-07 21-21-01](https://github.com/luau-project/minpack-builder/assets/18295115/bab70581-2fb9-4079-b9dd-1a14ec00aca5)
> [!IMPORTANT]
>
Expand Down Expand Up @@ -163,7 +163,7 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
ninja --version
```
![Screenshot from 2024-06-07 21-31-26](https://github.com/luau-project/minpack-builder/assets/18295115/047f54b4-dd32-48e5-b929-23e83a5c934a)
![Screenshot from 2024-06-07 21-31-26](https://github.com/luau-project/minpack-builder/assets/18295115/047f54b4-dd32-48e5-b929-23e83a5c934a)
5. Set a variable to hold the path to a working directory, create that directory, and then change dir to this new directory
```cmd
Expand All @@ -187,9 +187,13 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
set FC=flang-new
```
8. Clone minpack-builder by running ```git clone https://github.com/luau-project/minpack-builder```
8. Clone minpack-builder by running
![Screenshot from 2024-06-07 21-42-10](https://github.com/luau-project/minpack-builder/assets/18295115/5b914fa9-12a3-44df-91cb-631877146016)
```cmd
git clone https://github.com/luau-project/minpack-builder
```
![Screenshot from 2024-06-07 21-42-10](https://github.com/luau-project/minpack-builder/assets/18295115/5b914fa9-12a3-44df-91cb-631877146016)
9. By default, minpack-builder downloads (optional param ```USE_DOWNLOAD``` is ```ON```) minpack source code to the same directory of minpack-builder (provided by optional param ```DOWNLOAD_DIR```).
Expand All @@ -207,15 +211,15 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
10. Review the configuration summary and proceed to build
![Screenshot from 2024-06-07 21-42-48](https://github.com/luau-project/minpack-builder/assets/18295115/da2d1bb5-7955-42b2-a3bd-ae6c9c656cfa)
![Screenshot from 2024-06-07 21-42-48](https://github.com/luau-project/minpack-builder/assets/18295115/da2d1bb5-7955-42b2-a3bd-ae6c9c656cfa)
11. Build the library.
```
cmake --build "%BUILD_DIR%"
```
![Screenshot from 2024-06-07 21-43-15](https://github.com/luau-project/minpack-builder/assets/18295115/9b2c574d-f31f-4cab-9899-624db0893b22)
![Screenshot from 2024-06-07 21-43-15](https://github.com/luau-project/minpack-builder/assets/18295115/9b2c574d-f31f-4cab-9899-624db0893b22)
> [!NOTE]
Expand All @@ -233,7 +237,7 @@ works well on ```cmd``` once you answer ```Y``` when asked. You would receive an
cmake --install "%BUILD_DIR%"
```
![Screenshot from 2024-06-07 21-43-38](https://github.com/luau-project/minpack-builder/assets/18295115/84e9b3a6-ac33-48f9-a78f-773676fa41a1)
![Screenshot from 2024-06-07 21-43-38](https://github.com/luau-project/minpack-builder/assets/18295115/84e9b3a6-ac33-48f9-a78f-773676fa41a1)
---
[Documentation](README.md)

0 comments on commit 592ca8f

Please sign in to comment.