Skip to content

Commit

Permalink
Build 4.07
Browse files Browse the repository at this point in the history
  • Loading branch information
tleedjarv committed Apr 25, 2023
1 parent 574a271 commit 33cac06
Showing 1 changed file with 16 additions and 207 deletions.
223 changes: 16 additions & 207 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,16 @@ on:
- push

jobs:
docs:
runs-on: ubuntu-20.04

steps:
- run: sudo apt-get update

- name: Checkout code
uses: actions/checkout@v3

- name: Use OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
opam-depext: false

- run: sudo apt-get install hevea lynx texlive-latex-base

- run: opam exec -- make docs

- name: Store user manual for the build jobs
uses: actions/upload-artifact@v3
with:
name: unison-docs
path: |
doc/unison-manual.txt
doc/unison-manual.html
doc/unison-manual.pdf
build:
if: ${{ !cancelled() }} # Don't fail if 'docs' failed
needs: docs

strategy:
fail-fast: false
matrix:
job:
- { os: macos-12 , ocaml-version: 5.0.0 }
- { os: macos-12 , ocaml-version: 4.14.1 }
- { os: macos-10.15 , ocaml-version: 4.14.1 , publish: true , fnsuffix: -macos-x86_64 }
- { os: ubuntu-22.04 , ocaml-version: 5.0.0 }
- { os: ubuntu-22.04 , ocaml-version: 4.14.1 }
- { os: ubuntu-20.04 , ocaml-version: 4.14.1 }
- { os: windows-2022 , ocaml-version: 4.14.0+mingw64c , publish: true , fnsuffix: -windows-x86_64 }
- { os: windows-2019 , ocaml-version: 4.14.0+mingw32c , publish: true , fnsuffix: -windows-i386 }
- { os: ubuntu-20.04 , ocaml-version: 4.08.1 , publish: true }
- { os: ubuntu-20.04 , ocaml-version: 4.07.1 , publish: true }
- { os: ubuntu-20.04 , ocaml-version: 4.06.1 , publish: true }

runs-on: ${{ matrix.job.os }}

Expand Down Expand Up @@ -262,13 +228,6 @@ jobs:
name: unison-${{ steps.vars.outputs.REF_SHAS }}.ocaml-${{ matrix.job.ocaml-version }}.${{ matrix.job.os }}
path: ${{ steps.vars.outputs.PKG_DIR }}/bin/*

- name: Copy user manual
continue-on-error: ${{ !(steps.vars.outputs.DEPLOY && matrix.job.publish) }}
uses: actions/download-artifact@v3
with:
name: unison-docs
path: '${{ steps.vars.outputs.PKG_DIR }}'

- name: Prepare package
# if: steps.vars.outputs.DEPLOY
shell: bash
Expand Down Expand Up @@ -375,23 +334,18 @@ jobs:
# This list is intended to balance good enough coverage and
# limited resource usage.
job:
- { os: ubuntu-22.04 , ocaml-version: 5.0.x , ref: v2.53.0 }
- { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.53.0 }
- { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.52.1 }
- { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.51.5 }
- { os: ubuntu-22.04 , ocaml-version: 4.08.x , ref: v2.51.5 }
- { os: ubuntu-22.04 , ocaml-version: 4.08.x , ref: v2.51.2 }
- { os: ubuntu-22.04 , ocaml-version: 4.08.x , ref: 2.48.4 }
- { os: windows-2019 , ocaml-version: ocaml-variants.4.14.0+mingw64c , ref: v2.53.0 }
- { os: windows-2019 , ocaml-version: ocaml-variants.4.14.0+mingw64c , ref: v2.52.1 }
- { os: windows-2019 , ocaml-version: ocaml-variants.4.08.1+mingw32c , ref: v2.51.5 }
- { os: windows-2019 , ocaml-version: ocaml-variants.4.08.1+mingw64c , ref: v2.51.2 }
- { os: windows-2019 , ocaml-version: ocaml-variants.4.08.1+mingw64c , ref: 2.48.4 }
- { os: macos-12 , ocaml-version: 4.14.x , ref: v2.53.0 }
- { os: macos-12 , ocaml-version: 4.14.x , ref: v2.52.1 }
- { os: macos-12 , ocaml-version: 4.08.x , ref: v2.51.5 }
- { os: macos-12 , ocaml-version: 4.08.x , ref: v2.51.2 }
- { os: macos-12 , ocaml-version: 4.08.x , ref: 2.48.4 }
- { os: ubuntu-20.04 , ocaml-version: 4.07.x , ref: v2.52.1 }
- { os: ubuntu-20.04 , ocaml-version: 4.07.x , ref: v2.52.0 }
- { os: ubuntu-20.04 , ocaml-version: 4.07.x , ref: v2.51.5 }
- { os: ubuntu-20.04 , ocaml-version: 4.07.x , ref: v2.51.5 }
- { os: ubuntu-20.04 , ocaml-version: 4.07.x , ref: v2.51.2 }
- { os: ubuntu-20.04 , ocaml-version: 4.07.x , ref: 2.48.4 }
- { os: macos-11 , ocaml-version: 4.07.x , ref: v2.52.1 }
- { os: macos-11 , ocaml-version: 4.07.x , ref: v2.52.0 }
- { os: macos-11 , ocaml-version: 4.07.x , ref: v2.51.5 }
- { os: macos-10.15 , ocaml-version: 4.07.x , ref: v2.51.5 }
- { os: macos-10.15 , ocaml-version: 4.07.x , ref: v2.51.2 }
- { os: macos-10.15 , ocaml-version: 4.07.x , ref: 2.48.4 }

runs-on: ${{ matrix.job.os }}

Expand Down Expand Up @@ -1046,44 +1000,12 @@ jobs:
_prev/src/unison -ui text -selftest testr_c socket://127.0.0.1:55443/testr_s -killserver
## We know the code is ok with various ocaml versions, so this is
## just checking the dune build process. Therefore build each OS
## family just once. Pick a different ocaml version because that's
## better coverage without adding a build.
opam_dune_build:
strategy:
fail-fast: false
matrix:
job:
- { os: ubuntu-22.04 , ocaml-compiler: 4.12.x }
- { os: macos-11 , ocaml-compiler: 4.11.x }

runs-on: ${{ matrix.job.os }}

steps:
- if: contains(matrix.job.os, 'ubuntu')
run: sudo apt-get update

- name: Checkout code
uses: actions/checkout@v3

- name: Use OCaml ${{ matrix.job.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "${{ matrix.job.ocaml-compiler }}"

- run: opam install . --deps-only

- run: opam exec -- dune build && cp -L ./_build/install/default/bin/unison* ./src/

# - run: opam exec -- make test

bytecode_build:
strategy:
fail-fast: false
matrix:
job:
- { os: ubuntu-22.04 , ocaml-compiler: 4.14.x }
- { os: ubuntu-22.04 , ocaml-compiler: 4.07.x }

runs-on: ${{ matrix.job.os }}

Expand All @@ -1105,116 +1027,3 @@ jobs:

- run: opam exec -- make test


build_compat:
if: ${{ !cancelled() }} # Don't fail if 'docs' failed
needs: docs

strategy:
fail-fast: false
matrix:
job:
- { ocaml-version: 4.14.x, publish: true, fnsuffix: -ubuntu-x86_64 }
- { ocaml-version: "ocaml-variants.4.14.1+options,ocaml-option-musl,ocaml-option-static,ocaml-option-flambda", publish: true, fnsuffix: -ubuntu-x86_64-static }
- { ocaml-version: 4.13.x }
- { ocaml-version: 4.12.x }
- { ocaml-version: 4.11.x }
- { ocaml-version: 4.10.x }
- { ocaml-version: 4.09.x }
- { ocaml-version: 4.08.x, publish: true, fnsuffix: +ocaml4.08-ubuntu-x86_64 }

runs-on: ubuntu-latest
container: ubuntu:16.04

steps:
- name: Set up the OS
run: |
apt-get update
apt-get install --assume-yes git make gcc patch wget bzip2 unzip musl-tools
- name: Checkout code
uses: actions/checkout@v3

- name: Use OCaml ${{ matrix.job.ocaml-version }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.job.ocaml-version }}
opam-disable-sandboxing: true
opam-pin: false
opam-depext: false

- name: Build text UI
run: |
opam exec -- make src UISTYLE=text STATIC=${{ contains(matrix.job.ocaml-version, '-musl') }}
mkdir -p pkg/bin
cp src/unison pkg/bin/
cp src/unison-fsmonitor pkg/bin/
- name: Run local tests
run: opam exec -- make test

- name: Run remote tests
run: |
mkdir localsocket
chmod 700 localsocket
# Separate backup dir must be set for server instance so that the central
# backup location of both instances doesn't overlap
UNISONBACKUPDIR=./src/testbak4 ./src/unison -socket ./localsocket/test.sock &
sleep 1 # Wait for the server to be fully started
test -S ./localsocket/test.sock
./src/unison -ui text -selftest testr3 socket://{./localsocket/test.sock}/testr4 -killserver
- name: Build GUI
if: ${{ !contains(matrix.job.ocaml-version, '-musl') }}
run: |
opam depext --install --verbose --yes lablgtk3 && opam install ocamlfind
opam exec -- make src UISTYLE=gtk3
cp src/unison pkg/bin/unison-gui
- name: Initialize packaging variables
id: vars
run: |
REF_SHAS=$(echo '${{ github.sha }}' | awk '{ print substr($0, 1, 8) }')
unset REF_TAG ; case "${GITHUB_REF}" in refs/tags/*) REF_TAG="${GITHUB_REF#refs/tags/}" ;; esac;
PKG_VER="${REF_TAG:-git_$REF_SHAS}"
PKG_VER="${PKG_VER#v}"
echo PKG_NAME="${PROJECT_NAME}-${PKG_VER}${{ matrix.job.fnsuffix }}.tar.gz" >> $GITHUB_OUTPUT
echo REF_SHAS=${REF_SHAS} >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
with:
name: unison-${{ steps.vars.outputs.REF_SHAS }}.ocaml-${{ matrix.job.ocaml-version }}.ubuntu.x86_64
path: pkg/bin/*

- name: Copy user manual
if: matrix.job.publish
continue-on-error: ${{ !(github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && matrix.job.publish) }}
uses: actions/download-artifact@v3
with:
name: unison-docs
path: pkg

- name: Prepare package
if: matrix.job.publish
run: |
strip pkg/bin/*
cp README* pkg/
cp LICENSE* pkg/
- name: Package
if: matrix.job.publish
run: cd pkg && tar czf '${{ steps.vars.outputs.PKG_NAME }}' *

- uses: actions/upload-artifact@v3
if: matrix.job.publish
with:
name: ${{ steps.vars.outputs.PKG_NAME }}.ocaml-${{ matrix.job.ocaml-version }}.ubuntu_compat-publish
path: pkg/${{ steps.vars.outputs.PKG_NAME }}

- name: Publish
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && matrix.job.publish
uses: softprops/action-gh-release@v1
with:
files: pkg/${{ steps.vars.outputs.PKG_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 33cac06

Please sign in to comment.