[libnfsviv][Python] bump to version 3.7, performance improvements; [C… #117
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: ci-cli | |
| env: | |
| SRC: unvivtool.c | |
| DEST: unvivtool | |
| BRANCHES: #-DUVTUTF8 | |
| GCCFLAGS: -fPIE -D_FORTIFY_SOURCE=2 -fstack-clash-protection -fstack-protector-strong -D_GNU_SOURCE | |
| CPPFLAGS: -D_GLIBCXX_ASSERTIONS -fPIE -Wl,-pie -fstack-clash-protection -fstack-protector-strong -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE # -pie | |
| CPPFLAGS_MACOS: -D_GLIBCXX_ASSERTIONS -fPIE -Wl,-pie -fstack-protector-strong -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE # -pie | |
| GCCDEBUGFLAGS: -pedantic -Og -g -Wall -Wextra -Wstack-protector -fasynchronous-unwind-tables | |
| CPPDEBUGFLAGS: -Og -g -Wall -Wextra -Wstack-protector -fasynchronous-unwind-tables | |
| on: | |
| [push, pull_request] | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| name: Ubuntu C89/C++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compile | |
| shell: bash | |
| run: | | |
| gcc -std=c89 ${{ env.GCCFLAGS }} "${{ env.SRC }}" -o "${{ env.DEST }}" ${{ env.GCCDEBUGFLAGS }} ${{ env.BRANCHES }} | |
| g++ -std=c++17 ${{ env.CPPFLAGS }} "${{ env.SRC }}" -o "${{ env.DEST }}_c++" ${{ env.CPPDEBUGFLAGS }} ${{ env.BRANCHES }} | |
| clang -std=c89 ${{ env.GCCFLAGS }} "${{ env.SRC }}" -o "${{ env.DEST }}_clang" ${{ env.GCCDEBUGFLAGS }} ${{ env.BRANCHES }} -Wno-embedded-directive | |
| clang++ -std=c++17 ${{ env.CPPFLAGS }} "${{ env.SRC }}" -o "${{ env.DEST }}_clang_c++" ${{ env.CPPDEBUGFLAGS }} ${{ env.BRANCHES }} -Wno-embedded-directive | |
| ls -lg | |
| - name: Store executables | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unvivtool | |
| path: | | |
| ${{ env.DEST }} | |
| ${{ env.DEST }}_c++ | |
| ${{ env.DEST }}_clang | |
| ${{ env.DEST }}_clang_c++ | |
| macos: | |
| runs-on: macos-latest | |
| name: macOS C89/C++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compile | |
| shell: bash | |
| run: | | |
| clang -std=c89 "${{ env.SRC }}" -o "${{ env.DEST }}_${{ runner.os }}" ${{ env.GCCDEBUGFLAGS }} ${{ env.BRANCHES }} | |
| clang++ -std=c++17 ${{ env.CPPFLAGS_MACOS }} "${{ env.SRC }}" -o "${{ env.DEST }}_${{ runner.os }}_c++" ${{ env.CPPDEBUGFLAGS }} ${{ env.BRANCHES }} | |
| ls -lg | |
| - name: Store executables | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unvivtool_${{ runner.os }} | |
| path: | | |
| ${{ env.DEST }}_${{ runner.os }} | |
| ${{ env.DEST }}_${{ runner.os }}_c++ | |
| windows: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ windows-latest ] | |
| arch: [ x86, x64 ] | |
| name: Windows (MSVC ${{ matrix.arch }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: Compile | |
| run: | | |
| cl.exe /W4 /utf-8 /O2 /TC unvivtool.c /Fe:unvivtool_${{ matrix.arch }}.exe /wd4267 /wd4996 | |
| dir | |
| - name: Store executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unvivtool_${{ matrix.arch }}.exe | |
| path: unvivtool_${{ matrix.arch }}.exe | |
| test-linux: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| valgrind: "valgrind -v --leak-check=full --show-leak-kinds=all --track-origins=yes" | |
| needs: | |
| - linux | |
| - macos | |
| - windows | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| python-version: [ "3.13" ] | |
| std: [ "", "_c++" ] | |
| name: Test ${{ matrix.os }} ${{ matrix.std }} (Python ${{ matrix.python-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download executable | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: unvivtool | |
| - run: ls -lg | |
| - run: chmod +x unvivtool${{ matrix.std }} | |
| - name: Install valgrind | |
| shell: bash | |
| run: | | |
| sudo apt update | |
| sudo apt install valgrind --fix-missing | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: "pytest" | |
| shell: bash | |
| run: | | |
| python -m pip install -q pytest | |
| pytest ./tests/test_cli_decodeencode${{ matrix.std }}.py -vvs | |
| test-macos: | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - linux | |
| - macos | |
| - windows | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-latest ] | |
| python-version: [ "3.13" ] | |
| std: [ "", "_c++" ] | |
| name: Test ${{ matrix.os }} ${{ matrix.std }} (Python ${{ matrix.python-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download executable | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: unvivtool_${{ runner.os }} | |
| - run: ls -lg | |
| - run: chmod +x unvivtool_${{ runner.os }}${{ matrix.std }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: "pytest" | |
| shell: bash | |
| run: | | |
| ls -lg | |
| python -m pip install -q pytest | |
| pytest ./tests/test_cli_decodeencode${{ matrix.std }}.py -vvs | |
| test-windows: | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - linux | |
| - macos | |
| - windows | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ windows-latest ] | |
| arch: [ x86, x64 ] | |
| python-version: [ "3.13" ] | |
| name: Test ${{ matrix.os }} ${{ matrix.arch }} (python-${{ matrix.python-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download executable | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: unvivtool_${{ matrix.arch }}.exe | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: ${{ matrix.arch }} | |
| - name: "pytest" | |
| shell: bash | |
| run: | | |
| python -m pip install -q pytest | |
| pytest ./tests/test_cli_decodeencode.py -vvs |