Fix typo in yaml filenames #17
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: array-merge-test-valgrind | |
| # The `workflow_dispatch` lets us manually trigger this action | |
| # through the GitHub web interface. See | |
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | |
| # for more details. | |
| # We probably want to re-run the `array_merge` checks if the | |
| # definition of `mergesort` changes since this depends on that. | |
| on: | |
| push: | |
| paths: | |
| - 'array_merge/**' | |
| - 'mergesort/mergesort.[ch]' | |
| - '.github/workflows/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cache gtest library | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-gtest-lib | |
| with: | |
| key: $${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/usr/local/lib/libgtest.a') }} | |
| path: /usr/local/lib/libgtest.a | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Install gtest manually | |
| run: sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake CMakeLists.txt && sudo make && sudo cp lib/*.a /usr/lib && sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a && sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a | |
| - name: Install valgrind | |
| run: sudo apt-get install -y valgrind | |
| - name: Check out the code | |
| uses: actions/checkout@v2 | |
| - name: Compile code | |
| run: g++ -Wall -g -o array_merge_test ../mergesort/mergesort.c array_merge.c array_merge_test.cpp -lgtest -pthread -std=c++0x | |
| working-directory: array_merge | |
| - name: Run test | |
| run: valgrind -v --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./array_merge_test | |
| working-directory: array_merge |