Skip to content

DNM: add a CI job to iterate on the Windows build #17

DNM: add a CI job to iterate on the Windows build

DNM: add a CI job to iterate on the Windows build #17

name: Build on Linux, Run on Windows
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
jobs:
build-linux:
runs-on: ubuntu-latest
outputs:
sha1: ${{ steps.build.outputs.SHA1 }}
steps:
- uses: actions/checkout@v4
# Install Julia 1.7 for BinaryBuilder. Note that this is an old version of
# Julia, but it is required for compatibility with BinaryBuilder.
- uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- uses: julia-actions/cache@v2
- name: build
run: |
julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=yes .github/julia/build_tarballs.jl x86_64-w64-mingw32-cxx11 --verbose --deploy=local
file=/home/runner/.julia/dev/SCIP_jll/Artifacts.toml
sha1=$(grep '^git-tree-sha1' "$file" | cut -d '"' -f2)
echo "artifact_path=${sha1}" >> $GITHUB_ENV
echo "SHA1=${sha1}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: /home/runner/.julia/artifacts/${{ env.artifact_path }}
run-windows:
runs-on: windows-latest
needs: build-linux
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
arch: x64
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/download-artifact@v4
with:
name: artifacts
path: override
- shell: julia --color=yes --project=. {0}
run: |
import SCIP_jll
sha = last(splitpath(SCIP_jll.artifact_dir))
dir = joinpath(ENV["GITHUB_WORKSPACE"], "override")
content = "$sha = \"$(dir)\"\n"
@show content
write("/home/runner/.julia/artifacts/Overrides.toml", content)
- uses: julia-actions/julia-runtest@v1