Skip to content

Commit 9b07ad2

Browse files
authored
Merge pull request #21 from umarcor/ci/containers
ci: add container jobs
2 parents ea960c7 + edeb4d3 commit 9b07ad2

2 files changed

Lines changed: 162 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 159 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
jobs:
1616

17+
1718
test:
1819
strategy:
1920
fail-fast: false
@@ -36,18 +37,173 @@ jobs:
3637
with:
3738
fetch-depth: 0
3839

39-
- name: make env
40+
- name: Make env
41+
run: |
42+
cd test
43+
make env
44+
make env-info
45+
46+
- name: Make example-command
47+
run: |
48+
cd test
49+
make example-command
50+
51+
- name: Make test-command
52+
run: |
53+
cd test
54+
make test-command
55+
56+
57+
# https://www.debian.org/releases/
58+
# http://releases.ubuntu.com/
59+
debian:
60+
runs-on: ubuntu-latest
61+
strategy:
62+
fail-fast: false
63+
max-parallel: 3
64+
matrix:
65+
os:
66+
- debian:buster
67+
- debian:bullseye
68+
- debian:sid
69+
- ubuntu:14.04
70+
- ubuntu:16.04
71+
- ubuntu:18.04
72+
- ubuntu:20.04
73+
- ubuntu:20.10
74+
container: ${{ matrix.os }}
75+
steps:
76+
77+
- name: Install dependencies
78+
run: |
79+
apt update -qq
80+
apt install -y make wget git
81+
82+
- uses: actions/checkout@v2
83+
with:
84+
fetch-depth: 0
85+
86+
- name: Make env
87+
run: |
88+
cd test
89+
make env
90+
make env-info
91+
92+
- name: Make example-command
93+
run: |
94+
cd test
95+
make example-command
96+
97+
- name: Make test-command
98+
run: |
99+
cd test
100+
make test-command
101+
102+
103+
# https://fedoraproject.org/wiki/Releases
104+
fedora:
105+
runs-on: ubuntu-latest
106+
strategy:
107+
fail-fast: false
108+
max-parallel: 3
109+
matrix:
110+
os:
111+
- 32
112+
- 33
113+
- 34
114+
container: fedora:${{ matrix.os }}
115+
steps:
116+
117+
- name: Install dependencies
118+
run: |
119+
dnf update -y
120+
dnf install -y make wget git which
121+
122+
- uses: actions/checkout@v2
123+
with:
124+
fetch-depth: 0
125+
126+
- name: Make env
127+
run: |
128+
cd test
129+
make env
130+
make env-info
131+
132+
- name: Make example-command
133+
run: |
134+
cd test
135+
make example-command
136+
137+
- name: Make test-command
138+
run: |
139+
cd test
140+
make test-command
141+
142+
143+
centos:
144+
runs-on: ubuntu-latest
145+
strategy:
146+
fail-fast: false
147+
max-parallel: 3
148+
matrix:
149+
os:
150+
- 7
151+
- 8
152+
container: centos:${{ matrix.os }}
153+
steps:
154+
155+
- name: Install dependencies
156+
run: |
157+
yum update -y
158+
yum install -y make wget git which
159+
160+
- uses: actions/checkout@v2
161+
with:
162+
fetch-depth: 0
163+
164+
- name: Make env
165+
run: |
166+
cd test
167+
make env
168+
make env-info
169+
170+
- name: Make example-command
171+
run: |
172+
cd test
173+
make example-command
174+
175+
- name: Make test-command
176+
run: |
177+
cd test
178+
make test-command
179+
180+
181+
archlinux:
182+
runs-on: ubuntu-latest
183+
container: archlinux
184+
steps:
185+
186+
- name: Install dependencies
187+
run: |
188+
pacman -Syu --noconfirm
189+
pacman -S make wget git which --noconfirm
190+
191+
- uses: actions/checkout@v2
192+
with:
193+
fetch-depth: 0
194+
195+
- name: Make env
40196
run: |
41197
cd test
42198
make env
43199
make env-info
44200
45-
- name: example
201+
- name: Make example-command
46202
run: |
47203
cd test
48204
make example-command
49205
50-
- name: test
206+
- name: Make test-command
51207
run: |
52208
cd test
53209
make test-command

Makefile.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ $(TOP_DIR)/third_party/make-env/conda.mk: $(TOP_DIR)/.gitmodules
2626

2727
# Example make target which runs commands inside the conda environment.
2828
example-command: | $(CONDA_ENV_PYTHON)
29-
$(IN_CONDA_ENV) echo "Python is $$(which python)"
29+
ifneq ($(OS_TYPE),Windows)
30+
$(IN_CONDA_ENV) PYBIN=$$(which python3) && echo "Python is $$PYBIN"
31+
endif
3032
$(IN_CONDA_ENV) python --version
3133

3234
# Check that no system packages are found in the environment.

0 commit comments

Comments
 (0)