11name : ' Full Flow'
22
33env :
4- VERSION : 1.5.2
5- # PACKAGE_SUFFIX: '-pre.1'
6- PACKAGE_SUFFIX : ' '
4+ VERSION : 1.6.0
5+ PACKAGE_SUFFIX : ' -pre.1'
6+ # PACKAGE_SUFFIX: ''
77 ASM_VERSION : 1.0.0
88 BUILD_TYPE : Release
9+ VCPKG_HASH : 0f88ecb8528605f91980b90a2c5bad88e3cb565f
910 # Indicates the location of the vcpkg as a Git submodule of the project repository.
1011 # VCPKG_ROOT: ${{ github.workspace }}/vcpkg
1112 # Tells vcpkg where binary packages are stored.
@@ -28,95 +29,76 @@ jobs:
2829 runs-on : ${{ matrix.os }}
2930 strategy :
3031 matrix :
31- os : [ubuntu-20.04, windows-latest, macos-latest]
32- arch : [x64, arm64]
33- # include:
34- # - os: windows-latest
35- # arch: x86
36- exclude :
37- # no build agent for Windows ARM
38- - os : windows-latest
32+ include :
33+ - os : ubuntu-20.04
34+ arch : x64
35+ vcpkg_triplet : x64-linux
36+ vcpkg_config : RelWithDebInfo
37+ dotnet_rid : linux-x64
38+ - os : ubuntu-20.04
3939 arch : arm64
40- # no more x64 agent available on GitHub Actions
41- - os : macos-latest
40+ vcpkg_triplet : arm64-linux
41+ vcpkg_config : RelWithDebInfo
42+ dotnet_rid : linux-arm64
43+ - os : windows-latest
4244 arch : x64
45+ vcpkg_triplet : x64-windows-static
46+ vcpkg_config : Release
47+ dotnet_rid : win-x64
48+ - os : macos-latest
49+ arch : arm64
50+ vcpkg_triplet : arm64-osx
51+ vcpkg_config : RelWithDebInfo
52+ dotnet_rid : osx-arm64
53+
4354 fail-fast : false
4455 name : ' build: ${{ matrix.os }} (${{ matrix.arch }})'
4556
4657 steps :
4758
48- - uses : actions/checkout@v3
59+ - uses : actions/checkout@v4
4960 with :
5061 submodules : true
5162
52- - name : Windows Env
53- if : matrix.os == 'windows-latest'
54- run : |
55- echo "VCPKG_DEFAULT_VCPKG_TRIPLET=${{ matrix.arch }}-windows-static" >> $env:GITHUB_ENV
56- echo "VCPKG_TRIPLET=${{ matrix.arch }}-windows-static" >> $env:GITHUB_ENV
57- echo "VCPKG_CONFIG=Release" >> $env:GITHUB_ENV
58-
59- - name : Linux Env
60- if : matrix.os == 'ubuntu-20.04'
61- run : |
62- echo "VCPKG_DEFAULT_VCPKG_TRIPLET=${{ matrix.arch }}-linux" >> $GITHUB_ENV
63- echo "VCPKG_TRIPLET=${{ matrix.arch }}-linux" >> $GITHUB_ENV
64- echo "VCPKG_CONFIG=RelWithDebInfo" >> $GITHUB_ENV
65-
66- - name : MacOS Env
67- if : matrix.os == 'macos-latest'
68- run : |
69- echo "VCPKG_DEFAULT_VCPKG_TRIPLET=${{ matrix.arch }}-osx" >> $GITHUB_ENV
70- echo "VCPKG_TRIPLET=${{ matrix.arch }}-osx" >> $GITHUB_ENV
71- echo "VCPKG_CONFIG=RelWithDebInfo" >> $GITHUB_ENV
72-
73- - name : Windows x64
74- if : runner.os == 'Windows' && matrix.arch == 'x64'
75- run : |
76- echo "DOTNET_RID=win-x64" >> $env:GITHUB_ENV
77-
78- - name : Windows x32
79- if : runner.os == 'Windows' && matrix.arch == 'x86'
63+ - name : env (windows)
64+ if : runner.os == 'Windows'
8065 run : |
81- echo "VCPKG_DEFAULT_VCPKG_TRIPLET=${{ matrix.arch }}-windows " >> $env:GITHUB_ENV
82- echo "VCPKG_TRIPLET=${{ matrix.arch }}-windows " >> $env:GITHUB_ENV
83- echo "DOTNET_RID=win-x86 " >> $env:GITHUB_ENV
84- echo "CMAKE_OPTIONS=-A Win32 " >> $env:GITHUB_ENV
66+ echo "VCPKG_DEFAULT_VCPKG_TRIPLET=${{ matrix.vcpkg_triplet }}" >> $env:GITHUB_ENV
67+ echo "VCPKG_TRIPLET=${{ matrix.vcpkg_triplet }}" >> $env:GITHUB_ENV
68+ echo "VCPKG_CONFIG=${{ matrix.vcpkg_config }} " >> $env:GITHUB_ENV
69+ echo "DOTNET_RID=${{ matrix.dotnet_rid }} " >> $env:GITHUB_ENV
8570
86- - name : Linux x64
87- if : runner.os == 'Linux' && matrix.arch == 'x64 '
71+ - name : env
72+ if : runner.os == 'Linux' || runner.os == 'macOS '
8873 run : |
89- echo "DOTNET_RID=linux-x64" >> $GITHUB_ENV
74+ echo "VCPKG_DEFAULT_VCPKG_TRIPLET=${{ matrix.vcpkg_triplet }}" >> $GITHUB_ENV
75+ echo "VCPKG_TRIPLET=${{ matrix.vcpkg_triplet }}" >> $GITHUB_ENV
76+ echo "VCPKG_CONFIG=${{ matrix.vcpkg_config }}" >> $GITHUB_ENV
77+ echo "DOTNET_RID=${{ matrix.dotnet_rid }}" >> $GITHUB_ENV
9078
9179 - name : Linux ARM
9280 if : runner.os == 'Linux' && matrix.arch == 'arm64'
9381 run : |
9482 sudo apt-get update
9583 sudo apt-get --yes install g++-aarch64-linux-gnu pkg-config-aarch64-linux-gnu
9684 echo "CMAKE_OPTIONS=-D CMAKE_SYSTEM_PROCESSOR=aarch64 -D CMAKE_C_COMPILER=$(which aarch64-linux-gnu-gcc) -D CMAKE_CXX_COMPILER=$(which aarch64-linux-gnu-g++)" >> $GITHUB_ENV
97- echo "DOTNET_RID=linux-arm64" >> $GITHUB_ENV
98-
99- - name : OSX x64
100- if : runner.os == 'macOS' && matrix.arch == 'x64'
101- run : |
102- echo "DOTNET_RID=osx-x64" >> $GITHUB_ENV
85+ echo "SUPPRESS_TEST=1" >> $GITHUB_ENV
10386
10487 - name : OSX M1
10588 if : runner.os == 'macOS' && matrix.arch == 'arm64'
10689 run : |
10790 echo "CMAKE_OPTIONS=-D CMAKE_OSX_ARCHITECTURES=arm64" >> $GITHUB_ENV
108- echo "DOTNET_RID=osx-arm64" >> $GITHUB_ENV
10991
11092 - uses : friendlyanon/setup-vcpkg@v1
11193 # seems like the absense of commit hash expects vcpkg submodule, i don't want that
11294 with :
113- committish : 261dd6831673d3b07e5118261f7e161a21d1a759
95+ committish : ${{ env.VCPKG_HASH }}
11496 # set to false to clear any cache in case of build errors
11597 cache : false
11698
117- - name : show cmake config
118- run : cmake -h
119- working-directory : native
99+ # - name: show cmake config
100+ # run: cmake -h
101+ # working-directory: native
120102
121103 - name : configure
122104 run : cmake -B build -S . -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D "CMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" -D "VCPKG_TARGET_TRIPLET=${{ env.VCPKG_TRIPLET }}" ${{ env.CMAKE_OPTIONS }}
@@ -130,7 +112,31 @@ jobs:
130112 run : ls -R
131113 working-directory : native
132114
133- - uses : actions/upload-artifact@v3
115+ - uses : actions/upload-artifact@v4
116+ name : Collect Artifacts
117+ with :
118+ name : native-${{ matrix.dotnet_rid }}
119+ path : |
120+ native/ubin/**/*
121+ if-no-files-found : error
122+
123+ # create a unified fat native binary
124+ make-fat-native :
125+ runs-on : ubuntu-latest
126+ needs : build-native
127+ steps :
128+
129+ - uses : actions/download-artifact@v4
130+ with :
131+ pattern : native-*
132+ path : native/ubin/
133+ merge-multiple : true
134+
135+ - name : debug
136+ run : ls -R
137+ working-directory : .
138+
139+ - uses : actions/upload-artifact@v4
134140 name : Collect Artifacts
135141 with :
136142 name : native
@@ -139,10 +145,18 @@ jobs:
139145
140146 test-managed :
141147 runs-on : ${{ matrix.os }}
142- needs : build -native
148+ needs : make-fat -native
143149 strategy :
144150 matrix :
145- os : [ubuntu-20.04, ubuntu-22.04, windows-2022, macos-latest]
151+ include :
152+ - os : ubuntu-20.04
153+ dotnet_rid : linux-x64
154+ - os : ubuntu-22.04
155+ dotnet_rid : linux-x64
156+ - os : windows-2022
157+ dotnet_rid : win-x64
158+ - os : macos-latest
159+ dotnet_rid : osx-arm64
146160 fail-fast : false
147161 name : ' test: ${{ matrix.os }}'
148162
@@ -152,11 +166,11 @@ jobs:
152166
153167 steps :
154168
155- - uses : actions/checkout@v3
169+ - uses : actions/checkout@v4
156170 with :
157171 submodules : true
158172
159- - uses : actions/download-artifact@v3
173+ - uses : actions/download-artifact@v4
160174 with :
161175 name : native
162176 path : native/ubin/
@@ -183,15 +197,15 @@ jobs:
183197 run : dotnet test managed/IronCompress.sln -c release /p:Version=${{ env.VERSION }}${{ env.PACKAGE_SUFFIX }} /p:FileVersion=$VERSION /p:AssemblyVersion=$ASM_VERSION
184198
185199 build-managed :
186- needs : build -native
200+ needs : make-fat -native
187201 runs-on : ubuntu-latest
188202 steps :
189203
190- - uses : actions/checkout@v3
204+ - uses : actions/checkout@v4
191205 with :
192206 submodules : true
193207
194- - uses : actions/download-artifact@v2
208+ - uses : actions/download-artifact@v4
195209 with :
196210 name : native
197211 path : native/ubin/
@@ -210,7 +224,7 @@ jobs:
210224 - name : Build
211225 run : dotnet build managed/IronCompress.sln -c release /p:Version=${{ env.VERSION }}${{ env.PACKAGE_SUFFIX }} /p:FileVersion=$VERSION /p:AssemblyVersion=$ASM_VERSION
212226
213- - uses : actions/upload-artifact@v2
227+ - uses : actions/upload-artifact@v4
214228 name : Collect Artifacts
215229 with :
216230 name : managed
@@ -224,7 +238,7 @@ jobs:
224238 environment : nuget
225239 steps :
226240
227- - uses : actions/download-artifact@v2
241+ - uses : actions/download-artifact@v4
228242 with :
229243 name : managed
230244 path : pub/managed/
0 commit comments