Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGibb committed Jul 17, 2024
1 parent 92f2341 commit aea414d
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/scripts/depexts/generate-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ ENV OPAMCONFIRMLEVEL=unsafe-yes
ENV OPAMPRECISETRACKING=1
COPY opam /usr/bin/opam
RUN echo 'default-invariant: [ $OCAML_INVARIANT ]' > /opam/opamrc
EOF

if [ $target == "nix" ]; then
cat >>$dir/Dockerfile << EOF
RUN echo 'global-variables: [[os-distribution ["nixos"] "nixos"]]' > /opam/opamrc
EOF
fi

cat >>$dir/Dockerfile << EOF
RUN /usr/bin/opam init --no-setup --disable-sandboxing --bare --config /opam/opamrc git+$OPAM_REPO#$OPAM_REPO_SHA
RUN echo 'archive-mirrors: "https://opam.ocaml.org/cache"' >> \$OPAMROOT/config
RUN /usr/bin/opam switch create this-opam --formula='$OCAML_INVARIANT'
Expand Down Expand Up @@ -180,15 +171,21 @@ cd /github/workspace
#cd local-opam
/usr/bin/opam install . --deps
eval \$(opam env)
eval \$(/usr/bin/opam env)
./configure
make
./opam config report
./opam switch create confs --empty
EOF

if [ $target == "nix" ]; then
cat >>$dir/entrypoint.sh << EOF
mkdir ~/.opam
echo 'global-variables: [[os-distribution ["nixos"] "nixos"]]' > ~/.opam/config
EOF
fi

# Test depexts

Expand Down

0 comments on commit aea414d

Please sign in to comment.