Layers! Including light weight rain gear. I like disposable ponchos because they take up minimal room and weight. It can be cool and rainy or sunny and quite warm. I would not bother with shorts or capris myself, but I would find some not true formal, but dressy clothes. A pair of nice black slacks with a dressy top can do the trick. Depends a lot on which cruise line you are going on.
Marty