1
+ name : fpm-deployment
2
+
3
+ # When a PR occurs, the fpm package of `stdlib` will be generated.
4
+ on : [push, pull_request]
5
+ env :
6
+ GCC_V : " 10"
7
+
8
+ jobs :
9
+ Build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Git clone fpm branch (stdlib-fpm)
14
+ run : git clone -b stdlib-fpm https://github.com/fortran-lang/stdlib.git
15
+
16
+ - name : Checkout stdlib code (master)
17
+ uses : actions/checkout@v2
18
+ with :
19
+ path : " stdlib-master"
20
+
21
+ - name : Set up Python 3.x
22
+ uses : actions/setup-python@v1
23
+ with :
24
+ python-version : 3.x
25
+
26
+ - name : Install fypp
27
+ run : pip install --upgrade fypp
28
+
29
+ - name : Generate stdlib-fpm package
30
+ run : |
31
+ ls
32
+ sh ./stdlib-master/ci/fpm-deployment.sh
33
+
34
+ - name : Install GFortran
35
+ run : |
36
+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_V }} 100 \
37
+ --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_V }} \
38
+ --slave /usr/bingcov gcov /usr/bin/gcov-${{ env.GCC_V }}
39
+ - name : Install fpm latest release
40
+ uses : fortran-lang/setup-fpm@v3
41
+ with :
42
+ github-token : ${{ secrets.GITHUB_TOKEN }}
43
+
44
+ - name : Run fpm test
45
+ run : |
46
+ cp -r stdlib stdlib-fpm-test
47
+ cd stdlib-fpm-test
48
+ fpm test
49
+ - name : Run fpm test (release)
50
+ run : |
51
+ cd stdlib-fpm-test
52
+ fpm test --profile release
53
+ # Update and deploy the f90 files generated by github-ci to the `stdlib-fpm` branch.
54
+ - name : Deploy
55
+ uses : JamesIves/github-pages-deploy-action@releases/v3
56
+ if : github.event_name != 'pull_request'
57
+ with :
58
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59
+ BRANCH : stdlib-fpm
60
+ FOLDER : stdlib
0 commit comments