-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (121 loc) · 4.05 KB
/
Copy pathpublish.yml
File metadata and controls
151 lines (121 loc) · 4.05 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: publish
on:
release:
types: [published]
jobs:
gh-pages:
runs-on: ubuntu-22.04
env:
test-directory: .test/docs
steps:
- name: Display Compiler Version
run: g++ --version
- name: Install MPFR
run: |
sudo apt-get update -y
sudo apt-get install -y libmpfr-dev
- name: Checkout Repository
uses: actions/checkout@v3
- name: Copy Library Files
working-directory: ${{env.test-directory}}
run: |
cp ../../hypercomplex/Hypercomplex.hpp Hypercomplex.hpp
cp ../../hypercomplex/Hypercomplex_MPFR.hpp Hypercomplex_MPFR.hpp
cp ../../hypercomplex/Polynomial.hpp Polynomial.hpp
- name: Compile Docs Test Program
working-directory: ${{env.test-directory}}
run: g++ -DUSEMPFR=1 --std=c++17 test.cpp -o test -lmpfr -lgmp
- name: Execute Test Program
working-directory: ${{env.test-directory}}
run: ./test
- name: BuildTheDocs
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: '.'
doxyfile-path: './Doxyfile'
enable-latex: false
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: 'docs'
destination_dir: 'docs'
keep_files: true
Anaconda:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Miniconda & Environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.11
auto-update-conda: true
auto-activate-base: true
- name: Install conda build suite
shell: bash -l {0}
run: conda install anaconda-client conda-build conda-verify numpy
- name: Conda Info
shell: bash -l {0}
run: |
conda info -a
conda list
- name: Render version into the build recipe
shell: bash -l {0}
run: |
VERSION=$(<hypercomplex/VERSION)
VERSION="${VERSION:1}"
sed -i "s/{{ version }}/$VERSION/" meta.yaml
- name: Build Anaconda Package
shell: bash -l {0}
run: conda build . -c conda-forge
- name: Upload to Anaconda.org
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda config --set anaconda_upload yes
tag=${GITHUB_REF##*/}
tag="${tag:1}"
anaconda upload --user AngryMaciek $CONDA_PREFIX/conda-bld/noarch/hypercomplex-$tag-0.tar.bz2
DockerHub:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build & Publish image to DockerHub
env:
docker_username: angrymaciek
docker_password: ${{ secrets.DOCKER_PASSWORD }}
run: |
repo_name="hypercomplex"
tag=${GITHUB_REF##*/}
tag="${tag:1}"
docker build -t angrymaciek/${repo_name}:latest .
docker tag angrymaciek/${repo_name} angrymaciek/${repo_name}:${tag}
echo $docker_password | docker login -u $docker_username --password-stdin
docker push angrymaciek/${repo_name}:${tag}
CHANGELOG:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.CHANGELOG_TOKEN }}
- name: Update CHANGELOG
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
excludeTypes: docs,other
includeRefIssues: false
reverseOrder: true
- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_user_name: AngryMaciek
commit_user_email: wsciekly.maciek@gmail.com
commit_message: 'docs: CHANGELOG.md auto update'
push_options: --force