-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (57 loc) · 1.7 KB
/
build-and-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: build-and-test
run-name: ${{ github.actor }} is building "${{ github.ref_name }}"
on: [push]
jobs:
build:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- run: |
set -ex
python updatelib.py
bash build.sh
mkdir -p upload/{release,doc}
cp rAMPL_*.tar.gz upload/release/
cp rAMPL_*.tar.gz upload/release/rAMPL.tar.gz
cp -r docs/build/html upload/doc/R
- uses: actions/upload-artifact@v4
with:
name: drop
path: upload/
test:
needs: build
strategy:
matrix:
include:
- os: ubuntu-latest
bundle: https://portal.ampl.com/dl/amplce/ampl.linux64.tgz
- os: macos-13
bundle: https://portal.ampl.com/dl/amplce/ampl.macos64.tgz
- os: windows-latest
bundle: https://portal.ampl.com/dl/amplce/ampl.mswin64.zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: actions/[email protected]
with:
name: drop
- name: Copy package
shell: bash
run: cp release/* .
- name: Install Rcpp and testthat
run: bash dependencies.sh
- name: Install package
run: bash install.sh
- name: Install AMPL
run: bash download-ampl.sh ${{ matrix.bundle }}
- name: Test package
shell: bash
run: SKIP_BIG_TESTS=1 PATH="`pwd`/ampl:$PATH" bash test.sh 2>&1