@@ -9,24 +9,19 @@ permissions:
99 actions : write
1010 contents : read
1111jobs :
12- build-windows-mac :
13- # Compile but don't test on these platforms
14- name : Julia ${{ matrix.triplet}} - ${{ github.event_name }}
12+ build :
1513 runs-on : ubuntu-latest
1614 strategy :
1715 fail-fast : false
1816 matrix :
19- triplet : ['aarch64-apple-darwin', 'x86_64-w64-mingw32-cxx11']
17+ triplet : ['x86_64-linux-gnu-cxx11', ' aarch64-apple-darwin', 'x86_64-w64-mingw32-cxx11']
2018 steps :
2119 - uses : actions/checkout@v4
22- # Install Julia 1.7 for BinaryBuilder. Note that this is an old version of
23- # Julia, but it is required for compatibility with BinaryBuilder.
2420 - uses : julia-actions/setup-julia@v2
2521 with :
2622 version : " 1.7"
2723 arch : x64
2824 - uses : julia-actions/cache@v2
29- # Set the environment variables required by BinaryBuilder.
3025 - run : |
3126 git fetch --tags
3227 echo "HIGHS_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')" >> $GITHUB_ENV
@@ -37,60 +32,65 @@ jobs:
3732 echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
3833 echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
3934 fi
40- - run : |
4135 julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
4236 julia --color=yes .github/julia/build_tarballs.jl ${{ matrix.triplet }} --verbose --deploy="local"
4337 env:
4438 BINARYBUILDER_AUTOMATIC_APPLE: true
45- build-and-test-linux :
46- name : Julia - ${{ github.event_name }}
47- runs-on : ubuntu-latest
39+ - uses : actions/upload-artifact@v4
40+ with :
41+ name : ${{ matrix.triplet }}
42+ path : ${GITHUB_WORKSPACE}/products/*
43+ test :
44+ runs-on : ${{ matrix.os }}
45+ needs : build
46+ strategy :
47+ fail-fast : false
48+ matrix :
49+ include :
50+ - triplet : ' x86_64-linux-gnu-cxx11'
51+ os : ' ubuntu-latest'
52+ arch : x64
53+ - triplet : ' aarch64-apple-darwin'
54+ os : ' macos-14'
55+ arch : aarch64
56+ - triplet : ' x86_64-w64-mingw32-cxx11'
57+ os : ' windows-latest'
58+ arch : x64
4859 steps :
4960 - uses : actions/checkout@v4
50- # Install Julia 1.7 for BinaryBuilder. Note that this is an old version of
51- # Julia, but it is required for compatibility with BinaryBuilder.
52- - uses : julia-actions/setup-julia@v2
53- with :
54- version : " 1.7"
55- arch : x64
56- - uses : julia-actions/cache@v2
57- # Set the environment variables required by BinaryBuilder.
58- - run : |
59- git fetch --tags
60- echo "HIGHS_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')" >> $GITHUB_ENV
61- if [ "${{ github.event_name }}" = "pull_request" ]; then
62- echo "HIGHS_COMMIT=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
63- echo "HIGHS_URL=${{ github.event.pull_request.head.repo.clone_url }}" >> $GITHUB_ENV
64- else
65- echo "HIGHS_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
66- echo "HIGHS_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
67- fi
68- - run : |
69- julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
70- julia --color=yes .github/julia/build_tarballs.jl x86_64-linux-gnu-cxx11 --verbose --deploy="local"
71- # Now install a newer version of Julia to actually test HiGHS_jll. We
72- # choose v1.10 because it is the current Long-Term Support (LTS).
7361 - uses : julia-actions/setup-julia@v2
7462 with :
7563 version : " 1.10"
76- arch : x64
77- # We want to install the latest version of HiGHS.jl, but we also want it
78- # to be compatible with our newly compiled HiGHS_jll. To do so, we
79- # manually edit HiGHS.jl's Project.toml file to allow any v1.X.Y version
80- # of HiGHS_jll
64+ arch : ${{ matrix.arch }}
65+ - uses : actions/download-artifact@v4
66+ with :
67+ name : ${{ matrix.triplet }}
68+ - run : |
69+ ls ${GITHUB_WORKSPACE}
70+ cd ${GITHUB_WORKSPACE}/${{ matrix.triplet }}
71+ ls .
72+ tar -xzf *.${{ matrix.triplet }}.tar.gz
73+ ls .
8174 - shell : julia --color=yes {0}
8275 run : |
8376 using Pkg
8477 Pkg.develop("HiGHS")
78+ Pkg.develop(; path="/home/runner/.julia/dev/HiGHS_jll")
79+ # Relax the compat bounds in HiGHS.jl
8580 project_filename = "/home/runner/.julia/dev/HiGHS/Project.toml"
8681 project = read(project_filename, String)
8782 write(
8883 project_filename,
8984 replace(project, r"HiGHS_jll = \"=.+?\"" => "HiGHS_jll = \"1\""),
9085 )
91- # Now we can add HiGHS_jll and run the tests for HiGHS.
86+ #
87+ import HiGHS_jll
88+ artifact_dir = HiGHS_jll.artifact_dir
89+ sha = last(splitpath(artifact_dir))
90+ dir = escape_string(joinpath(ENV["GITHUB_WORKSPACE"], "${{ matrix.triplet }}"))
91+ content = "$sha = \"$(dir)\"\n"
92+ write(replace(artifact_dir, sha => "Overrides.toml"), content)
9293 - shell : julia --color=yes {0}
9394 run : |
9495 using Pkg
95- Pkg.develop(; path="/home/runner/.julia/dev/HiGHS_jll")
9696 Pkg.test("HiGHS")
0 commit comments