@@ -33,49 +33,46 @@ jobs:
3333 env :
3434 OPENPACE_VER : 1.1.3
3535 VCPKG_INSTALLED : ${{ github.workspace }}\vcpkg_installed
36+ BUILD_NUMBER : ${{ github.run_number }}
3637 steps :
3738 - name : Checkout
38- uses : actions/checkout@v4
39+ uses : actions/checkout@v5
3940 - name : Git describe
4041 id : ghd
4142 uses : proudust/gh-describe@v2
4243 - name : Package name
4344 shell : bash
44- run : |
45- echo ARTIFACT=OpenSC-${{ steps.ghd.outputs.tag }}_${{ matrix.platform }}${{ matrix.configuration == 'Light' && '-Light' || '' }} >> $GITHUB_ENV
46- - name : Install CPDK
47- run : choco install windows-cryptographic-provider-development-kit -y > $null
48- - name : Install autotools
49- uses : msys2/setup-msys2@v2
50- with :
51- install : autotools mingw-w64-x86_64-pkg-config
52- - name : Bootstrap
53- shell : msys2 {0}
5445 run : |
5546 if [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" == "master" ]]; then
56- ./bootstrap
47+ SUFFIX=""
5748 elif [[ "${{ github.event_name }}" == "push" ]]; then
58- ./bootstrap.ci -s "-${{ github.ref_name }}"
49+ SUFFIX= "-${{ github.ref_name }}"
5950 elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "master" ]]; then
60- ./bootstrap.ci -s "-pr${{ github.event.number }}"
51+ SUFFIX= "-pr${{ github.event.number }}"
6152 else
62- ./bootstrap.ci -s "-${{ github.base_ref }}-pr${{ github.event.number }}"
53+ SUFFIX= "-${{ github.base_ref }}-pr${{ github.event.number }}"
6354 fi
64- - name : Configure
65- shell : bash
66- run : ./configure --disable-openssl --disable-readline --disable-zlib || cat config.log
55+ echo ARTIFACT=${{ steps.ghd.outputs.tag }}${SUFFIX}_${{ matrix.platform }}${{ matrix.configuration == 'Light' && '-Light' || '' }} >> $GITHUB_ENV
56+ - name : Install CPDK
57+ run : choco install windows-cryptographic-provider-development-kit -y > $null
6758 - name : Setup dev env
6859 uses : ilammy/msvc-dev-cmd@v1
6960 with :
7061 arch : ${{ matrix.setenv }}
62+ - name : Cache vcpkg
63+ if : matrix.configuration == 'Release'
64+ uses : actions/cache@v4
65+ with :
66+ path : ${{ github.workspace }}/vcpkg_cache
67+ key : vcpkg-${{ matrix.configuration }}-${{ matrix.platform }}-${{ hashFiles('.github/workflows/windows.yml', '.github/vcpkg.json') }}
7168 - name : Prepare vcpkg
7269 if : matrix.configuration == 'Release'
7370 uses : lukka/run-vcpkg@v11
7471 with :
75- vcpkgGitCommitId : 0d5cae153065957df7f382de7c1549ccc88027e5
7672 vcpkgJsonGlob : .github/vcpkg.json
7773 runVcpkgInstall : true
7874 env :
75+ VCPKG_BINARY_SOURCES : clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
7976 VCPKG_DEFAULT_TRIPLET : ${{ matrix.platform }}-windows-static
8077 VCPKG_INSTALLED_DIR : ${{ env.VCPKG_INSTALLED }}
8178 - name : Install WIX
@@ -131,7 +128,7 @@ jobs:
131128 - name : Archive debug artifacts
132129 uses : actions/upload-artifact@v4
133130 with :
134- name : ${{ env.ARTIFACT }}-Debug
131+ name : OpenSC- ${{ env.ARTIFACT }}-Debug
135132 path : |
136133 ./src/**/*.pdb
137134 ./win32/*.pdb
0 commit comments