-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (87 loc) · 3.13 KB
/
test_macos.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: "Tests on macOS"
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
build-and-test:
name: Tests on macOS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: "macos-13"
python: "3.11"
- os: "macos-14"
python: "3.12"
env:
BUILD_DIR: ${{ github.workspace }}/build_dir
TEST_OUTPUT_DIR: ${{ github.workspace }}/test_output
EXAMPLE_DIR: ${{ github.workspace }}/example
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: make directories
run: |
mkdir build_dir
mkdir test_output
ls -la
- name: cmake configure
run: cmake ${{ github.workspace }} -DCMAKE_BUILD_TYPE=Release
working-directory: ${{ env.BUILD_DIR }}
- name: cmake build
run: cmake --build . --parallel 4
working-directory: ${{ env.BUILD_DIR }}
- name: test GENIE
run: |
gen=${EXAMPLE_DIR}/test
phen=${EXAMPLE_DIR}/test.pheno
covar=${EXAMPLE_DIR}/test.cov
annot=${EXAMPLE_DIR}/single.annot
env=${EXAMPLE_DIR}/test.env
./GENIE -g $gen -p $phen -c $covar -e $env -m G+GxE+NxE -k 10 -jn 10 -o ${TEST_OUTPUT_DIR}/test.1.out -a $annot -t 6
echo -e "\n\n###\n\n"
cat ${TEST_OUTPUT_DIR}/test.1.out
working-directory: ${{ env.BUILD_DIR }}
- name: test GENIE_multi_pheno
run: |
gen=${EXAMPLE_DIR}/test
phen=${EXAMPLE_DIR}/test.2.pheno
covar=${EXAMPLE_DIR}/test.cov
annot=${EXAMPLE_DIR}/single.annot
env=${EXAMPLE_DIR}/test.env
./GENIE_multi_pheno -g $gen -p $phen -c $covar -e $env -m G+GxE+NxE -k 10 -jn 10 -o ${TEST_OUTPUT_DIR}/test.2.out -a $annot -t 6
echo -e "\n\n###\n\n"
cat ${TEST_OUTPUT_DIR}/test.2.out
working-directory: ${{ env.BUILD_DIR }}
- name: test GENIE_mem
run: |
echo "genotype=${EXAMPLE_DIR}/test" > config.txt
echo "phenotype=${EXAMPLE_DIR}/test.pheno" >> config.txt
echo "covariate=${EXAMPLE_DIR}/test.cov" >> config.txt
echo "environment=${EXAMPLE_DIR}/test.env" >> config.txt
echo "annotation=${EXAMPLE_DIR}/single.annot" >> config.txt
echo "output=${TEST_OUTPUT_DIR}/test.3.out" >> config.txt
echo "nthreads=6" >> config.txt
echo "num_vec=20" >> config.txt
echo "num_jack=10" >> config.txt
echo "trace=1" >> config.txt
echo "model=G" >> config.txt
echo "verbose=1" >> config.txt
echo -e "\n\n###\n\n"
./GENIE_mem --config ./config.txt
cat ${TEST_OUTPUT_DIR}/test.3.out
working-directory: ${{ env.BUILD_DIR }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: install python module
run: |
pip install . -v
- name: run python tests
run: |
python test/test.py