1+ ---
12name : CI
23
34on :
45 pull_request :
5- branches : [ main ]
6+ branches : [main]
67 paths-ignore :
7- - ' **/*.md'
8+ - ' **/*.md'
89 push :
910 tags :
1011 - v*
1112 paths-ignore :
12- - ' **/*.md'
13+ - ' **/*.md'
1314
1415env :
1516 BOOST_VERSION : 1.75.0
@@ -22,38 +23,35 @@ jobs:
2223 fail-fast : false
2324 matrix :
2425 config :
25- - os : " ubuntu-16.04"
26- std : " 11"
2726 - os : " ubuntu-18.04"
28- std : " 11 "
27+ std : " 17 "
2928 - os : " ubuntu-20.04"
30- std : " 11"
31- - os : " ubuntu-16.04"
32- std : " 14"
33- - os : " ubuntu-18.04"
34- std : " 14"
35- - os : " ubuntu-20.04"
36- std : " 14"
29+ std : " 17"
30+ - os : " ubuntu-22.04"
31+ std : " 17"
3732 steps :
3833 - id : config
34+ name : Generate Artefact name
3935 run : |
40- artefact_name="boost${{ matrix.config.std }}-${{ env.BOOST_VERSION }}-${{ matrix.config.os }}-x64.tar.gz"
41- echo ::set-output name=artefact_name::$artefact_name
42- - uses : actions/checkout@v2
43- - name : Download boost
44- run : wget https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION//./_}.tar.gz
45- - name : Extract boost
46- run : tar xf boost_${BOOST_VERSION//./_}.tar.gz
47- - name : Build boost
36+ artefact_name="boost-${{ env.BOOST_VERSION }}-cpp${{ matrix.config.std }}-${{ matrix.config.os }}-x64.tar.gz"
37+ echo "artefact_name=$artefact_name" >> $GITHUB_OUTPUT
38+ - name : Checkout Boost
39+ uses : actions/checkout@v3
40+ with :
41+ repository : boostorg/boost
42+ ref : boost-${{ env.BOOST_VERSION }}
43+ path : boost
44+ submodules : recursive
45+ - name : Build Boost
46+ working-directory : boost
4847 run : |
49- cd boost_${BOOST_VERSION//./_}
5048 ./bootstrap.sh --prefix="${{ github.workspace }}/opt/boost${{ matrix.config.std }}"
5149 ./b2 -j$(nproc) install cxxflags="-std=c++${{ matrix.config.std }} -fPIC" linkflags="-std=c++${{ matrix.config.std }} -fPIC" link=static
5250 - name : Archive boost
5351 working-directory : ${{ github.workspace }}/opt
5452 run : cmake -E tar cJfv "${{ steps.config.outputs.artefact_name }}" boost${{ matrix.config.std }}
5553 - name : Upload artefact
56- uses : actions/upload-artifact@v2
54+ uses : actions/upload-artifact@v3
5755 with :
5856 name : " ${{ steps.config.outputs.artefact_name }}"
5957 path : " ${{ github.workspace }}/opt/${{ steps.config.outputs.artefact_name }}"
@@ -65,24 +63,20 @@ jobs:
6563 runs-on : ubuntu-latest
6664 needs : build
6765
68- steps :
69- - name : Create Release
70- id : create_release
71- uses : actions/create-release@v1.0.0
72- env :
73- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74- with :
75- tag_name : ${{ github.ref }}
76- release_name : Release ${{ github.ref }}
77- draft : false
78- prerelease : false
66+ outputs :
67+ upload_url : ${{ steps.create_release.outputs.upload_url }}
7968
80- - name : Store Release url
81- run : echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
82- - uses : actions/upload-artifact@v1
83- with :
84- path : ./upload_url
85- name : upload_url
69+ steps :
70+ - name : Create Release
71+ id : create_release
72+ uses : actions/create-release@v1.0.0
73+ env :
74+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75+ with :
76+ tag_name : ${{ github.ref }}
77+ release_name : Release ${{ github.ref }}
78+ draft : false
79+ prerelease : false
8680
8781 publish :
8882 if : contains(github.ref, 'tags/v')
@@ -93,48 +87,33 @@ jobs:
9387 fail-fast : false
9488 matrix :
9589 config :
96- - os : " ubuntu-16.04"
97- std : " 11"
9890 - os : " ubuntu-18.04"
99- std : " 11 "
91+ std : " 17 "
10092 - os : " ubuntu-20.04"
101- std : " 11"
102- - os : " ubuntu-16.04"
103- std : " 14"
104- - os : " ubuntu-18.04"
105- std : " 14"
106- - os : " ubuntu-20.04"
107- std : " 14"
93+ std : " 17"
94+ - os : " ubuntu-22.04"
95+ std : " 17"
10896 needs : release
10997
11098 steps :
111- - id : config
112- run : |
113- artefact_name="boost${{ matrix.config.std }}-${{ env.BOOST_VERSION }}-${{ matrix.config.os }}-x64.tar.gz"
114- echo ::set-output name=artefact_name::$artefact_name
115- - name : Download artifact
116- uses : actions/download-artifact@v1
117- with :
118- name : " ${{ steps.config.outputs.artefact_name }}"
119- path : ./
120- - name : Download URL
121- uses : actions/download-artifact@v1
122- with :
123- name : upload_url
124- path : ./
125- - id : set_upload_url
126- run : |
127- upload_url=`cat ./upload_url`
128- echo ::set-output name=upload_url::$upload_url
129- - name : Upload to Release
130- id : upload_to_release
131- uses : actions/upload-release-asset@v1.0.1
132- env :
133- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
134- with :
135- upload_url : ${{ steps.set_upload_url.outputs.upload_url }}
136- asset_path : " ./${{ steps.config.outputs.artefact_name }}"
137- asset_name : " ${{ steps.config.outputs.artefact_name }}"
138- asset_content_type : application/x-gtar
99+ - id : config
100+ run : |
101+ artefact_name="boost-${{ env.BOOST_VERSION }}-cpp${{ matrix.config.std }}-${{ matrix.config.os }}-x64.tar.gz"
102+ echo "artefact_name=$artefact_name" >> $GITHUB_OUTPUT
103+ - name : Download artifact
104+ uses : actions/download-artifact@v3
105+ with :
106+ name : " ${{ steps.config.outputs.artefact_name }}"
107+ path : ./
108+ - name : Upload to Release
109+ id : upload_to_release
110+ uses : actions/upload-release-asset@v1.0.1
111+ env :
112+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113+ with :
114+ upload_url : ${{ needs.release.outputs.upload_url }}
115+ asset_path : " ./${{ steps.config.outputs.artefact_name }}"
116+ asset_name : " ${{ steps.config.outputs.artefact_name }}"
117+ asset_content_type : application/x-gtar
139118
140119
0 commit comments