Skip to content

Commit 6384b36

Browse files
committed
tarballs
1 parent 82309ca commit 6384b36

File tree

4 files changed

+103
-22
lines changed

4 files changed

+103
-22
lines changed

.github/julia/build_tarballs.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
3535
-DZLIB_USE_STATIC_LIBS=${BUILD_STATIC} \
3636
-DHIPO=ON \
3737
-DBLAS_LIBRARIES="${libdir}/libopenblas.${dlext}" \
38-
-DMETIS_ROOT=${prefix} \
3938
..
4039
4140
if [[ "${target}" == *-linux-* ]]; then

.github/julia/generate_binaries.jl

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Version
2+
haskey(ENV, "HIGHS_RELEASE") || error("The environment variable HIGHS_RELEASE is not defined.")
3+
version = VersionNumber(ENV["HIGHS_RELEASE"])
4+
version2 = ENV["HIGHS_RELEASE"]
5+
package = "HIGHS"
6+
7+
platforms = [
8+
("aarch64-apple-darwin", "lib", "dylib"),
9+
("aarch64-linux-gnu-cxx11", "lib", "so" ),
10+
("aarch64-linux-musl-cxx11", "lib", "so" ),
11+
("aarch64-unknown-freebsd", "lib", "so" ),
12+
("armv6l-linux-gnueabihf-cxx11", "lib", "so" ),
13+
("armv6l-linux-musleabihf-cxx11", "lib", "so" ),
14+
("armv7l-linux-gnueabihf-cxx11", "lib", "so" ),
15+
("armv7l-linux-musleabihf-cxx11", "lib", "so" ),
16+
("i686-linux-gnu-cxx11", "lib", "so" ),
17+
("i686-linux-musl-cxx11", "lib", "so" ),
18+
("i686-w64-mingw32", "bin", "dll" ),
19+
("x86_64-apple-darwin", "lib", "dylib"),
20+
("x86_64-linux-gnu-cxx11", "lib", "so" ),
21+
("x86_64-linux-musl-cxx11", "lib", "so" ),
22+
("x86_64-unknown-freebsd", "lib", "so" ),
23+
("x86_64-w64-mingw32", "bin", "dll" )
24+
]
25+
26+
for (platform, libdir, ext) in platforms
27+
28+
tarball_name = "$package.v$version.$platform.tar.gz"
29+
30+
if isfile("products/$(tarball_name)")
31+
# Unzip the tarball generated by BinaryBuilder.jl
32+
isdir("products/$platform") && rm("products/$platform", recursive=true)
33+
mkdir("products/$platform")
34+
run(`tar -xzf products/$(tarball_name) -C products/$platform`)
35+
36+
if isfile("products/$platform/deps.tar.gz")
37+
# Unzip the tarball of the dependencies
38+
run(`tar -xzf products/$platform/deps.tar.gz -C products/$platform`)
39+
40+
# Copy the license of each dependency
41+
for folder in readdir("products/$platform/deps/licenses")
42+
cp("products/$platform/deps/licenses/$folder", "products/$platform/share/licenses/$folder")
43+
end
44+
rm("products/$platform/deps/licenses", recursive=true)
45+
46+
# Copy the shared library of each dependency
47+
for file in readdir("products/$platform/deps")
48+
cp("products/$platform/deps/$file", "products/$platform/$libdir/$file")
49+
end
50+
51+
# Remove the folder used to unzip the tarball of the dependencies
52+
rm("products/$platform/deps", recursive=true)
53+
rm("products/$platform/deps.tar.gz", recursive=true)
54+
55+
# Create the archives *_binaries
56+
isfile("$(package)_binaries.$version2.$platform.tar.gz") && rm("$(package)_binaries.$version2.$platform.tar.gz")
57+
isfile("$(package)_binaries.$version2.$platform.zip") && rm("$(package)_binaries.$version2.$platform.zip")
58+
cd("products/$platform")
59+
60+
# Create a folder with the version number of the package
61+
mkdir("$(package)_binaries.$version2")
62+
for folder in ("include", "share", "modules", "lib", "bin")
63+
cp(folder, "$(package)_binaries.$version2/$folder")
64+
end
65+
66+
cd("$(package)_binaries.$version2")
67+
if ext == "dll"
68+
run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip include share modules lib bin`)
69+
else
70+
run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz include share modules lib bin`)
71+
end
72+
cd("../../..")
73+
74+
# Remove the folder used to unzip the tarball generated by BinaryBuilder.jl
75+
rm("products/$platform", recursive=true)
76+
else
77+
@warn("The tarball deps.tar.gz is missing in $(tarball_name)!")
78+
end
79+
else
80+
@warn("The tarball for the platform $platform was not generated!")
81+
end
82+
end

.github/workflows/release.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: HiGHS -- Linux (x86_64) -- Release ${{ github.ref_name }}
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout Uno
14+
- name: Checkout HiGHS
1515
uses: actions/checkout@v4
1616

1717
- name: Install Julia
@@ -20,13 +20,13 @@ jobs:
2020
version: "1.7"
2121
arch: x64
2222

23-
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, UNO_RELEASE, UNO_COMMIT
23+
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, HIGHS_RELEASE, HIGHS_COMMIT
2424
shell: bash
2525
run: |
2626
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
27-
echo "UNO_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
28-
echo "UNO_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
29-
echo "UNO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
27+
echo "HIGHS_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
28+
echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
29+
echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
3030
3131
- name: Cross-compilation of HiGHS -- x86_64-linux-gnu-cxx11
3232
run: |
@@ -39,14 +39,14 @@ jobs:
3939
- name: Upload artifact
4040
uses: actions/upload-artifact@v4
4141
with:
42-
name: Uno_binaries.${{ github.ref_name }}.x86_64-linux-gnu-cxx11.tar.gz
43-
path: ./Uno_binaries.${{ github.ref_name }}.x86_64-linux-gnu-cxx11.tar.gz
42+
name: HiGHS_binaries.${{ github.ref_name }}.x86_64-linux-gnu-cxx11.tar.gz
43+
path: ./HiGHS_binaries.${{ github.ref_name }}.x86_64-linux-gnu-cxx11.tar.gz
4444

4545
build-linux-aarch64:
4646
name: HiGHS -- Linux (aarch64) -- Release ${{ github.ref_name }}
4747
runs-on: ubuntu-latest
4848
steps:
49-
- name: Checkout Uno
49+
- name: Checkout HiGHS
5050
uses: actions/checkout@v4
5151

5252
- name: Install Julia
@@ -59,9 +59,9 @@ jobs:
5959
shell: bash
6060
run: |
6161
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
62-
echo "UNO_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
63-
echo "UNO_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
64-
echo "UNO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
62+
echo "HIGHS_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
63+
echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
64+
echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
6565
6666
- name: Cross-compilation of HiGHS -- aarch64-linux-gnu-cxx11
6767
run: |
@@ -94,9 +94,9 @@ jobs:
9494
shell: bash
9595
run: |
9696
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
97-
echo "UNO_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
98-
echo "UNO_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
99-
echo "UNO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
97+
echo "HIGHS_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
98+
echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
99+
echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
100100
101101
- name: Cross-compilation of HiGHS -- x86_64-w64-mingw32-cxx11
102102
run: |
@@ -128,9 +128,9 @@ jobs:
128128
shell: bash
129129
run: |
130130
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
131-
echo "UNO_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
132-
echo "UNO_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
133-
echo "UNO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
131+
echo "HIGHS_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
132+
echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
133+
echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
134134
135135
- name: Cross-compilation of HiGHS -- x86_64-apple-darwin-cxx11
136136
run: |
@@ -163,9 +163,9 @@ jobs:
163163
shell: bash
164164
run: |
165165
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
166-
echo "UNO_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
167-
echo "UNO_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
168-
echo "UNO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
166+
echo "HIGHS_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
167+
echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
168+
echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
169169
170170
- name: Cross-compilation of HiGHS -- aarch64-apple-darwin-cxx11
171171
run: |

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ endif()
148148

149149
option(HIPO "Build HIPO" OFF)
150150
message(STATUS "Build HIPO: ${HIPO}")
151-
option(BUILD_OPENBLAS "Build OpenBLAS" ON)
151+
option(BUILD_OPENBLAS "Build OpenBLAS" OFF)
152152
message(STATUS "Build OpenBLAS: ${BUILD_OPENBLAS}")
153153
if (HIPO AND CSHARP)
154154
message(ERROR "HIPO is only available in C++. Not yet supported in C#.")

0 commit comments

Comments
 (0)