fixup! CodeCov #65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: [push, pull_request] | |
| env: | |
| CHERE_INVOKING: 'yes' | |
| MSYSTEM: 'UCRT64' | |
| PERL5LIB: /home/runneradmin/perl5/lib/perl5 | |
| # PERL5LIB: "${{ github.workspace }}/local/lib/perl5" | |
| jobs: | |
| msmtp: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash --noprofile --norc -e -o pipefail -l {0} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Cache pacman & CPAN Modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| C:\msys64\home\runneradmin\perl5 | |
| C:\msys64\var\cache\pacman\pkg | |
| key: build-dep | |
| - name: Add MSYS to path | |
| shell: pwsh | |
| run: | | |
| # echo "C:\msys64\ucrt64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Set up Devel::Cover | |
| env: | |
| MSYSTEM: 'MSYS' | |
| run: | | |
| pacman --noconfirm -S libxcrypt-devel pkgconf automake autoconf make texinfo gcc mingw-w64-ucrt-x86_64-gcc perl-HTML-Parser perl-Capture-Tiny perl-Mozilla-CA perl-IO-Socket-SSL perl-Sub-Exporter-Progressive perl-Test-Deep perl-Module-Runtime perl-Test-Requires perl-Test-Fatal perl-Try-Tiny perl-Test-Needs perl-Text-Diff perl-Test-Pod perl-Pod-Parser perl-Params-Util perl-Moo | |
| curl -sL http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib | |
| eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` | |
| cpanm install --notest Devel::Cover Devel::Cover::Report::Codecov | |
| - name: Download & patch | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| run: | | |
| curl -sLO https://github.com/mlt/msmtp/archive/refs/heads/native.zip | |
| /c/Program\ Files/7-Zip/7z x native.zip | |
| cd msmtp-native | |
| cp -a src src.orig | |
| perl -MDevel::Cover ../gt2mt.pl | |
| ~/perl5/bin/cover -report html -report codecov | |
| cd src | |
| windmc -u messages.mc | |
| perl -pi -e 's/code_page\(1\)/code_page(57004)/' messages.rc | |
| cp -a ../../get_message.c ./ | |
| cat <<'EOT' >> Makefile.am | |
| msmtp_SOURCES += get_message.c | |
| msmtp_LDADD += messages.o | |
| messages.o: messages.rc | |
| windres -o $@ $< | |
| EOT | |
| - name: Configure | |
| run: | | |
| export PATH=/ucrt64/bin:$PATH | |
| cd msmtp-native | |
| autoreconf -i | |
| ./configure --with-tls=sspi --with-vault=credman --disable-nls LDFLAGS=-Wl,-Bstatic,-lwinpthread | |
| - name: Build | |
| run: | | |
| export PATH=/ucrt64/bin:$PATH | |
| cd msmtp-native | |
| make | |
| strip --strip-all src/msmtp.exe | |
| - name: List SO imports | |
| run: | | |
| ldd msmtp-native/src/msmtp | |
| msmtp-native/src/msmtp --version | |
| - name: Set French locale | |
| shell: pwsh | |
| run: Set-WinSystemLocale -SystemLocale fr-FR | |
| - name: Set French locale 2 | |
| shell: pwsh | |
| run: Set-WinSystemLocale -SystemLocale fr-FR | |
| - name: Test with French locale | |
| run: msmtp-native/src/msmtp --version | |
| - name: Set German locale | |
| shell: pwsh | |
| run: Set-WinSystemLocale -SystemLocale de-DE | |
| - name: Set German locale 2 | |
| shell: pwsh | |
| run: Set-WinSystemLocale -SystemLocale de-DE | |
| - name: Set German locale 3 | |
| shell: pwsh | |
| run: Set-WinSystemLocale -SystemLocale de-DE | |
| - name: Test with German locale | |
| run: msmtp-native/src/msmtp --version | |
| - name: Set French locale | |
| shell: pwsh | |
| run: Set-WinSystemLocale -SystemLocale fr-FR | |
| - name: Test with French locale | |
| run: msmtp-native/src/msmtp --version | |
| - name: Failed build artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: config | |
| path: msmtp-native/config.log | |
| - name: Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: msmtp | |
| path: | | |
| msmtp-native/src/msmtp.exe | |
| msmtp-native/missing.csv | |
| msmtp-native/cover_db |