Fix missing return and invalid format specifier #66
This file contains 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: Build and Test | |
on: [push] | |
env: | |
TEST_CASES: d3_buffer_seek,_get_nth_digit,_insert_sorted,d3_word_binary_search,Array,glob,string_builder,Array::New,binout_directory,path_move_up,path_join,path_is_abs,path_view,extra_string,card_parse_get_type,empty_card,profiling,sync,multi_file | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.plat == 'linux' && 'ubuntu' || (matrix.plat == 'macosx' && 'macos' || matrix.plat == 'macosx-arm64' && 'macos' || matrix.plat) }}-${{ matrix.plat == 'macosx' && '13' || matrix.plat == 'macosx-arm64' && '14' || 'latest' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
plat: [linux, windows, macosx, macosx-arm64] | |
arch: [x86_64] | |
kind: [static] | |
env: | |
plat: ${{ matrix.plat == 'macosx-arm64' && 'macosx' || matrix.plat }} | |
arch: ${{ matrix.plat == 'windows' && 'x64' || matrix.plat == 'macosx-arm64' && 'arm64' || matrix.arch}} | |
name: ${{ matrix.plat == 'macosx-arm64' && 'macosx' || matrix.plat }}-${{ matrix.plat == 'macosx-arm64' && 'arm64' || matrix.arch }}-${{ matrix.kind }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: xmake-io/github-action-setup-xmake@v1 | |
with: | |
xmake-version: 2.8.6 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install boost | |
run: brew install boost | |
if: env.plat == 'macosx' | |
- name: Configure static | |
run: xmake f -yvD -p ${{ env.plat }} -a ${{ env.arch }} -k ${{ matrix.kind }} -m release --build_test=y --thread_safe=y --profiling=n --build_python=n | |
- name: Build static | |
run: xmake -wvD | |
- name: Test static | |
run: xmake run -w . dynareadout_test --test-case=${{ env.TEST_CASES }} | |
- name: Configure static-non-thread-safe | |
run: xmake f -yvD -p ${{ env.plat }} -a ${{ env.arch }} -k ${{ matrix.kind }} -m release --build_test=y --thread_safe=n --profiling=n --build_python=n | |
- name: Build static-non-thread-safe | |
run: xmake -wvD | |
- name: Test static-non-thread-safe | |
run: xmake run -w . dynareadout_test --test-case=${{ env.TEST_CASES }} | |
- name: Configure static-profiling | |
run: xmake f -yvD -p ${{ env.plat }} -a ${{ env.arch }} -k ${{ matrix.kind }} -m release --build_test=y --thread_safe=y --profiling=y --build_python=n | |
- name: Build static-profiling | |
run: xmake -wvD | |
- name: Test static-profiling | |
run: xmake run -w . dynareadout_test --test-case=${{ env.TEST_CASES }} | |
- name: Configure static-non-thread-safe-profiling | |
run: xmake f -yvD -p ${{ env.plat }} -a ${{ env.arch }} -k ${{ matrix.kind }} -m release --build_test=y --thread_safe=n --profiling=y --build_python=n | |
- name: Build static-non-thread-safe-profiling | |
run: xmake -wvD | |
- name: Test static-non-thread-safe-profiling | |
run: xmake run -w . dynareadout_test --test-case=${{ env.TEST_CASES }} | |
- name: Configure python | |
run: xmake f -yvD -p ${{ env.plat }} -a ${{ env.arch }} -k ${{ matrix.kind }} -m release --build_test=n --thread_safe=y --profiling=n --build_python=y | |
- name: Build python | |
run: xmake -wvD | |
- run: ls -la --color=always build/${{ env.plat }}/${{ env.arch }}/release | |
if: env.plat != 'windows' | |
- run: dir build/${{ env.plat }}/${{ env.arch }}/release | |
if: env.plat == 'windows' | |
- run: cp src/python/test.py build/${{ env.plat }}/${{ env.arch }}/release | |
if: env.plat != 'windows' | |
- run: Copy-Item -Path src/python/test.py -Destination build/${{ env.plat }}/${{ env.arch }}/release | |
if: env.plat == 'windows' | |
- name: Test python | |
run: cd build/${{ env.plat }}/${{ env.arch }}/release && python test.py | |
create-release: | |
if: startsWith(github.event.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: [build-and-test] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ncipollo/release-action@v1 | |
with: | |
body: | | |
Automatically generated by Github Actions Run ${{ github.run_id }} | |
generateReleaseNotes: true | |
makeLatest: true |