diff --git a/.github/workflows/Compile.yml b/.github/workflows/Compile.yml new file mode 100644 index 0000000..00f332e --- /dev/null +++ b/.github/workflows/Compile.yml @@ -0,0 +1,41 @@ +name: Compile + +on: + push: + branches: + - 'master' + - 'release-' + tags: + - '*' + pull_request: + +jobs: + compile: + name: juliac - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macOS-latest + steps: + - uses: actions/checkout@v4 + # - uses: julia-actions/setup-julia@v2 + # with: + # version: 'nightly' + - uses: julia-actions/install-juliaup@v2 + with: + channel: 'pr55047' # https://github.com/JuliaLang/julia/pull/55047 + - name: Patch julia-config.jl + run: | + juliaconfig=$(julia -e 'print(joinpath(Sys.BINDIR, Base.DATAROOTDIR,"julia", "julia-config.jl"))') + patch -p1 "${juliaconfig}" juliac/rpath-private-libs-macos.patch + if: ${{ matrix.os == 'macOS-latest' }} + - uses: julia-actions/cache@v2 + - name: Compile Runic with juliac + run: | + make -C juliac + - name: Smoke test compiled binary + run: | + ./juliac/runicc --check --diff . diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 8c53dea..9b4f67f 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -11,7 +11,7 @@ on: jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/juliac/rpath-private-libs-macos.patch b/juliac/rpath-private-libs-macos.patch new file mode 100644 index 0000000..f5c5e85 --- /dev/null +++ b/juliac/rpath-private-libs-macos.patch @@ -0,0 +1,16 @@ +diff --git a/contrib/julia-config.jl b/contrib/julia-config.jl +index 55996e9fe5..8725b08eba 100755 +--- a/contrib/julia-config.jl ++++ b/contrib/julia-config.jl +@@ -67,8 +67,9 @@ function ldlibs(doframework) + "julia" + end + if Sys.isunix() +- return "-L$(shell_escape(private_libDir())) " * "-Wl,-rpath,$(shell_escape(libDir())) " * +- (Sys.isapple() ? string() : "-Wl,-rpath,$(shell_escape(private_libDir())) ") * ++ return "-L$(shell_escape(private_libDir())) " * ++ "-Wl,-rpath,$(shell_escape(libDir())) " * ++ "-Wl,-rpath,$(shell_escape(private_libDir())) " * + "-l$libname" + else + return "-l$libname -lopenlibm"