Skip to content

Commit

Permalink
Fix CI (OCamlPro#518)
Browse files Browse the repository at this point in the history
* Updating docker build for fixing CI

* Test

* Test

* Test

* Test

* All jobs

* Fix style

* Fix indent

* Trying to delay depext installation

* Trying without specifying depect

* Test fix
  • Loading branch information
Stevendeo authored and Halbaroth committed Jan 24, 2023
1 parent c38c1c4 commit 245f85b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ name: Build with ocp Docker container
# The goal of this workflow is to test the installation of the project with opam
# on a specific light docker container instead of using default GH-actions one.

on:
push:
branches:
- fix-ci
- next
- main
on: [push,pull_request]

jobs:
install_docker:
Expand All @@ -20,16 +15,25 @@ jobs:
# as a system compiler. This container also contains opam 2.1.
container:
image: ocamlpro/ocaml:4.10
options: --user root

steps:
# This line is needed to acces and use opam. We are unable to set the user
# to `ocaml` with the container parameters
- run: sudo chmod a+wx .

# Checkout the code of the current branch
- name: Checkout code
uses: actions/checkout@v2

# Switch to ocaml user
- run: su ocaml

# This line is needed to acces and use opam. We are unable to set the user
# to `ocaml` with the container parameters
- run: sudo chmod a+wx .

# This line is needed to allow the working directory to be used even
# the ocaml user do not have rights on it.
- run: git config --global --add safe.directory /__w/alt-ergo/alt-ergo

# Create a switch with the system compiler (no compilation needed).
# And then, install external (no need for depext with opam 2.1) and libs deps.
- run: opam switch create . ocaml-system --deps-only
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ name: Build MacOS
# This workflow try to build and test Alt-Ergo on a MacOS system
# If the build succed, an artifact with the alt-ergo binary is uploaded
# It only runs on `next` or `main` branch
on:
push:
branches:
- fix-ci
- next
- main
on: [push,pull_request]

env:
OCAML_DEFAULT_VERSION: 4.10.0
Expand Down Expand Up @@ -63,7 +58,7 @@ jobs:

# Install dependencies
- name: Install deps
run: opam install ./*.opam --deps-only --with-test --depext
run: opam install ./*.opam --deps-only --with-test


# Build and install with opam
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Linter

on: push
on: [push,pull_request]

env:
OCAML_DEFAULT_VERSION: 4.10.0
Expand Down

0 comments on commit 245f85b

Please sign in to comment.