Skip to content

Commit 7ea7f96

Browse files
committed
merge from master
2 parents 962ac3a + b489e9a commit 7ea7f96

File tree

3 files changed

+48
-56
lines changed

3 files changed

+48
-56
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
container: rscohn2/oneapi-spec:latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: build in container
14+
env:
15+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID}}
16+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
17+
run: |
18+
python3 scripts/oneapi.py spec-venv
19+
. spec-venv/bin/activate
20+
python scripts/oneapi.py --branch $GITHUB_REF ci

scripts/oneapi.py

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import os.path
3535
from os.path import join
3636
import platform
37+
import requests
3738
import shutil
3839
from string import Template
3940
import stat
@@ -82,7 +83,7 @@ def __exit__(self, etype, value, traceback):
8283
os.chdir(self.savedPath)
8384

8485
def log(*args, **kwargs):
85-
print(indent * ' ' + ' '.join(map(str,args)), **kwargs)
86+
print(indent * ' ' + ' '.join(map(str,args)), flush = True, **kwargs)
8687

8788
def shell(c):
8889
log(c)
@@ -204,9 +205,12 @@ def ci_publish(root, target=None):
204205
root_only(root)
205206
if not args.branch:
206207
exit('Error: --branch <branchname> is required')
207-
shell('aws s3 sync --only-show-errors --delete site s3://%s/exclude/ci/branches/%s' % (staging_host, args.branch))
208-
log('published at http://staging.spec.oneapi.com.s3-website-us-west-2.amazonaws.com/exclude/ci/branches/%s/'
209-
% (args.branch))
208+
if 'AWS_SECRET_ACCESS_KEY' in os.environ:
209+
shell('aws s3 sync --only-show-errors --delete site s3://%s/exclude/ci/branches/%s' % (staging_host, args.branch))
210+
log('published at http://staging.spec.oneapi.com.s3-website-us-west-2.amazonaws.com/exclude/ci/branches/%s/'
211+
% (args.branch))
212+
else:
213+
log('Skipping publishing the site because AWS access key is not available. This is expected when building a fork')
210214

211215
@action
212216
def prod_publish(root, target=None):
@@ -252,18 +256,23 @@ def spec_venv(root, target=None):
252256
shell('%s install --quiet -r requirements.txt' % pip)
253257

254258
@action
255-
def clones(root='.', target=None):
259+
def get_tarballs(root='.', target=None):
256260
root_only(root)
257-
# defer loading this so script can be invoked without installing packages
258-
from git import Repo
259-
for repo_base in repos:
260-
dir = join('repos',repo_base)
261-
if os.path.exists(dir):
262-
continue
263-
uri = '%s/%s.git' % (os.environ['EXTRA_REPOS'], repo_base)
264-
log('clone:', uri)
265-
if not args.dry_run:
266-
Repo.clone_from(uri, dir, multi_options=['--depth','1'])
261+
print('exists',os.path.exists('tarballs'))
262+
if args.dry_run or os.path.exists('tarballs'):
263+
return
264+
makedirs('tarballs')
265+
for t in tarballs:
266+
tf = join('tarballs','%s.tgz' % t)
267+
url = 'https://spec.oneapi.com/tarballs/%s.tgz' % t
268+
r = requests.get(url, stream = True)
269+
log('wget', url, end = ' ')
270+
with open(tf, 'wb') as tb:
271+
for chunk in r.iter_content(chunk_size = 4 * 1024 * 1024):
272+
if chunk:
273+
tb.write(chunk)
274+
log('.', end = '')
275+
log('.')
267276

268277
@action
269278
def site(root, target=None):
@@ -285,7 +294,7 @@ def site(root, target=None):
285294
copytree(html, versions_x)
286295
copy(pdf, versions_x)
287296
for t in tarballs:
288-
tf = join('repos','oneapi-spec-tarballs','tarballs','%s.tgz' % t)
297+
tf = join('tarballs','%s.tgz' % t)
289298
log('cd',versions_x,'&& tar zxf',tf)
290299
if not args.dry_run:
291300
with tarfile.open(tf) as tar:
@@ -295,9 +304,9 @@ def site(root, target=None):
295304
@action
296305
def ci(root, target=None):
297306
root_only(root)
298-
clones(root)
307+
get_tarballs(root)
299308
site(root)
300-
if args.branch == 'publish':
309+
if args.branch == 'publish' or args.branch == 'refs/heads/publish':
301310
stage_publish(root)
302311
else:
303312
ci_publish(root)
@@ -307,7 +316,7 @@ def ci(root, target=None):
307316
commands = {'ci': ci,
308317
'ci-publish': ci_publish,
309318
'clean': clean,
310-
'clones': clones,
319+
'get-tarballs': get_tarballs,
311320
'dockerbuild': dockerbuild,
312321
'dockerpush': dockerpush,
313322
'dockerrun': dockerrun,
@@ -332,10 +341,6 @@ def ci(root, target=None):
332341
'oneL0',
333342
'oneDAL']
334343

335-
repos = ['onetbb-spec',
336-
'oneapi-spec-tarballs']
337-
338-
339344
def main():
340345
global args
341346
parser = argparse.ArgumentParser(description='Build oneapi spec.')

source/elements/oneTBB/source/configuration/feature_macros.rst

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,39 +36,6 @@ enabled in the compiler, and 0 otherwise.
3636
``TBB_USE_EXCEPTIONS=0``.
3737

3838

39-
TBB_USE_CAPTURED_EXCEPTION macro
40-
--------------------------------
41-
42-
The macro
43-
``TBB_USE_CAPTURED_EXCEPTION`` controls rethrow of
44-
exceptions within the library. Because C++03 does not support catching an
45-
exception on one thread and rethrowing it on another thread, the library
46-
sometimes resorts to rethrowing an approximation called
47-
``tbb::captured_exception``.
48-
49-
* Define
50-
``TBB_USE_CAPTURED_EXCEPTION=1`` to make the library
51-
rethrow an approximation. This is useful for uniform behavior across platforms.
52-
* Define
53-
``TBB_USE_CAPTURED_EXCEPTION=0`` to request rethrow of
54-
the exact exception. This setting is valid only on platforms that support the
55-
std::exception_ptr feature of C++11. Otherwise a compile-time diagnostic is
56-
issued.
57-
58-
On Windows* , Linux* and macOS* operating systems,
59-
the default value is
60-
``1`` for supported host compilers with
61-
``std::exception_ptr``, and
62-
``0`` otherwise. On IA-64 architecture processors the
63-
default value is
64-
``0``.
65-
66-
.. caution::
67-
68-
In order for exact exception propagation to work
69-
properly an appropriate library binary should be used.
70-
71-
7239
C++11 Support
7340
-------------
7441

0 commit comments

Comments
 (0)