Build and test (1.249-lcm, scheduled) #477
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test (1.249-lcm, scheduled) | |
on: | |
schedule: | |
# run every Monday, this refreshes the cache | |
- cron: '13 2 * * 1' | |
jobs: | |
python-test: | |
name: Python tests | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
test: ["", "-3"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: '1.249-lcm' | |
- name: Run python tests | |
run: bash .github/python-nosetests${{ matrix.test }}.sh | |
ocaml-test: | |
name: Ocaml tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: '1.249-lcm' | |
- name: Free space | |
shell: bash | |
run: sudo rm -rf /usr/local/lib/android | |
- name: Pull configuration from xs-opam | |
run: | | |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/release/yangtze/lcm/tools/xs-opam-ci.env | cut -f2 -d " " > .env | |
- name: Load environment file | |
id: dotenv | |
uses: falti/dotenv-action@v1 | |
- name: Update Ubuntu repositories | |
shell: bash | |
run: sudo apt-get update | |
- name: Use ocaml | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ steps.dotenv.outputs.ocaml_version_full }} | |
opam-repositories: | | |
xs-opam: ${{ steps.dotenv.outputs.repository }} | |
dune-cache: true | |
- name: Install dependencies | |
shell: bash | |
run: opam install . --deps-only --with-test -v | |
- name: Configure and build | |
shell: bash | |
run: | | |
opam exec -- ./configure | |
opam exec -- make | |
env: | |
XAPI_VERSION: "v1.249.0-${{ github.sha }}" | |
- name: Run tests | |
run: opam exec -- make test | |
- name: Avoid built packages to appear in the cache | |
# only packages in this repository follow a branch, the rest point | |
# to a tag | |
run: opam pin list --short | xargs opam unpin |