Skip to content

Commit

Permalink
Trying to fix the static build
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Merigoux committed Mar 20, 2024
1 parent d53268c commit 491f50c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
88 changes: 44 additions & 44 deletions .github/workflows/binary-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,50 @@ jobs:
# release_name: Release ${{ github.run_number }}


macos-build:
runs-on: macos-latest
# needs: create-release

steps:
- uses: actions/checkout@v2

- name: Opam modules cache
uses: actions/cache@v1
env:
cache-name: cache-opam-modules
with:
path: ~/.opam
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('mlang.opam', 'Makefile') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.11.2

- name: Install dependencies
run: |
brew install gmp mpfr
opam update
make init-without-switch
- name: Make mlang binary
run: |
eval $(opam env)
make build
# - name: Upload release asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }}
# asset_path: ./_build/default/src/main.exe
# asset_name: mlang-macos-v${{ github.run_number }}.exe
# asset_content_type: application/octet-stream
# macos-build:
# runs-on: macos-latest
# needs: create-release
#
# steps:
# - uses: actions/checkout@v2
#
# - name: Opam modules cache
# uses: actions/cache@v1
# env:
# cache-name: cache-opam-modules
# with:
# path: ~/.opam
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('mlang.opam', 'Makefile') }}
# restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
# ${{ runner.os }}-build-
# ${{ runner.os }}-
#
# - name: Set up OCaml
# uses: ocaml/setup-ocaml@v2
# with:
# ocaml-compiler: 4.11.2
#
# - name: Install dependencies
# run: |
# brew install gmp mpfr
# opam update
# make init-without-switch
#
# - name: Make mlang binary
# run: |
# eval $(opam env)
# make build
#
# - name: Upload release asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }}
# asset_path: ./_build/default/src/main.exe
# asset_name: mlang-macos-v${{ github.run_number }}.exe
# asset_content_type: application/octet-stream

linux-build:
# The type of runner that the job will run on
Expand Down
2 changes: 1 addition & 1 deletion src/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(env
(static
(ocamlopt_flags
(-ccopt -static -O3)))
(-ccopt -static -O3 -cclib -static -cclib -no-pie)))
(dev
(flags
(:standard -warn-error -A))))
Expand Down
2 changes: 1 addition & 1 deletion src/mlang/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(env
(static
(ocamlopt_flags
(-O3 -ccopt -static))))
(-O3 -ccopt -static -cclib -static -cclib -no-pie))))

(include_subdirs unqualified)

Expand Down

0 comments on commit 491f50c

Please sign in to comment.