Skip to content

Commit

Permalink
fix: Set cflags on the configure and build step
Browse files Browse the repository at this point in the history
  • Loading branch information
azubieta committed Dec 11, 2020
1 parent 4b22540 commit 73a621f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
if: ${{ env.TARGET_ARCH != 'x86_64' }}
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
sudo apt-get install g++-multilib libc6-dev-i386
exit 0
fi
Expand All @@ -50,12 +49,20 @@ jobs:
- name: Configure CMake ${{ matrix.TARGET_ARCH }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="cmake/$TARGET_ARCH-toolchain.cmake"
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
fi
cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="cmake/$TARGET_ARCH-toolchain.cmake"
- name: Build ${{ matrix.TARGET_ARCH }}
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
fi
cmake --build . --config $BUILD_TYPE
- name: Test ${{ matrix.TARGET_ARCH }}
working-directory: ${{runner.workspace}}/build
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ jobs:
- name: Configure CMake ${{ matrix.TARGET_ARCH }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="cmake/$TARGET_ARCH-toolchain.cmake"
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
fi
cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="cmake/$TARGET_ARCH-toolchain.cmake"
- name: Build ${{ matrix.TARGET_ARCH }}
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
fi
cmake --build . --config $BUILD_TYPE
- name: Test ${{ matrix.TARGET_ARCH }}
working-directory: ${{runner.workspace}}/build
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ jobs:
- name: Configure CMake ${{ matrix.TARGET_ARCH }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="cmake/$TARGET_ARCH-toolchain.cmake"
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
fi
cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="cmake/$TARGET_ARCH-toolchain.cmake"
- name: Build ${{ matrix.TARGET_ARCH }}
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: |
if [ "$TARGET_ARCH" == "i386" ]; then
export CFLAGS=-m32;
fi
cmake --build . --config $BUILD_TYPE
- name: Test ${{ matrix.TARGET_ARCH }}
working-directory: ${{runner.workspace}}/build
Expand Down

0 comments on commit 73a621f

Please sign in to comment.