Skip to content

Commit 85a251c

Browse files
committed
Fix CI
1 parent 0c59adc commit 85a251c

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on: push
44

55
env:
66
BUILD_TYPE: Release
7-
VCPKG_PATH: ${{github.workspace}}/vcpkg
87

98
jobs:
109
build:
@@ -16,19 +15,20 @@ jobs:
1615
config:
1716
- {
1817
name: "Ubuntu GCC", artifact: "nanconvert-linux.tar.gz",
19-
os: ubuntu-16.04,
20-
cc: "gcc-9", cxx: "g++-9"
18+
os: ubuntu-18.04,
19+
cc: "gcc-10", cxx: "g++-10"
2120
}
2221
- {
2322
name: "macOS", artifact: "nanconvert-macos.tar.gz",
24-
os: macos-10.15,
23+
os: macos-11,
2524
cc: "clang", cxx: "clang++"
2625
}
2726

2827
steps:
2928
- uses: actions/checkout@v2
3029
with:
31-
submodules: 'true'
30+
fetch-depth: 0
31+
submodules: 'recursive'
3232

3333
- name: Install GNU tar
3434
shell: bash
@@ -37,28 +37,32 @@ jobs:
3737
brew install gnu-tar
3838
fi
3939
40-
- name: vcpkg
41-
env:
42-
CC: ${{matrix.config.cc}}
43-
CXX: ${{matrix.config.cxx}}
44-
uses: lukka/run-vcpkg@v5
40+
- name: Restore vcpkg binary cache
41+
id: cache
42+
uses: actions/cache@v2
4543
with:
46-
setupOnly: true
44+
path: ~/.cache/vcpkg/
45+
key: ${{runner.os}}-${{hashFiles( 'vcpkg.json' ) }}-${{hashFiles( '.git/modules/cmake/HEAD' )}}-vcpkg-cache
46+
4747

48-
- name: CMake
49-
uses: lukka/run-cmake@v2
50-
id: runcmake
48+
- name: Build
49+
shell: bash
5150
env:
5251
CC: ${{matrix.config.cc}}
5352
CXX: ${{matrix.config.cxx}}
54-
with:
55-
cmakeListsTxtPath: '${{github.workspace}}/CMakeLists.txt'
56-
useVcpkgToolchainFile: true
57-
buildDirectory: build
58-
cmakeBuildType: Release
53+
run: |
54+
TC="${{github.workspace}}/cmake/toolchain.cmake"
55+
export VCPKG_OVERLAY_TRIPLETS="${{github.workspace}}/cmake/triplets"
56+
export FLAGS="ci"
57+
cd ${{github.workspace}}
58+
cmake -B build -S . \
59+
-DCMAKE_BUILD_TYPE=Release \
60+
-DCMAKE_TOOLCHAIN_FILE="$TC"
61+
cmake --build build
5962
6063
- name: Save release
6164
run: |
65+
cd ${{github.workspace}}
6266
mv ./build/{nanconvert_bruker,nanconvert_dicom} ./
6367
cp Scripts/{nanbruker,nanbruker_sge.qsub,nandicom} ./
6468
ALL="nanconvert_bruker nanbruker nanbruker_sge.qsub nanconvert_dicom nandicom"
@@ -113,11 +117,11 @@ jobs:
113117
config:
114118
- {
115119
name: "Ubuntu GCC", artifact: "nanconvert-linux.tar.gz",
116-
os: ubuntu-16.04
120+
os: ubuntu-18.04
117121
}
118122
- {
119123
name: "macOS", artifact: "nanconvert-macos.tar.gz",
120-
os: macos-10.15
124+
os: macos-11
121125
}
122126
needs: release
123127

0 commit comments

Comments
 (0)