-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use environment variable instead of multiple make files
- Loading branch information
1 parent
7509554
commit b3ad728
Showing
8 changed files
with
81 additions
and
110 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: run gsw_check (alternative compilers) | ||
|
||
on: | ||
pull_request: | ||
push: | ||
#branches: [master] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- name: windows / clang-cl (c++) | ||
os: windows-latest | ||
compiler: 'clang-cl /TP' | ||
make_tool: "nmake" | ||
- name: linux / g++ (c++) | ||
os: ubuntu-latest | ||
compiler: 'g++ -x c++' | ||
make_tool: "make" | ||
- name: linux / clang (c) | ||
os: ubuntu-latest | ||
compiler: 'clang' | ||
make_tool: "make" | ||
- name: linux / clang (c++) | ||
os: ubuntu-latest | ||
compiler: 'clang -x c++' | ||
make_tool: "make" | ||
- name: macos / g++ (c++) | ||
os: macos-latest | ||
compiler: 'g++ -x c++' | ||
make_tool: "make" | ||
- name: macos / clang (c) | ||
os: macos-latest | ||
compiler: 'clang' | ||
make_tool: "make" | ||
- name: macos / clang (c++) | ||
os: macos-latest | ||
compiler: 'clang -x c++' | ||
make_tool: "make" | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Check COMPILER variable | ||
shell: bash | ||
env: | ||
COMPILER: ${{ matrix.compiler }} | ||
run: | | ||
output=$(${{ matrix.make_tool }} name_compiler) | ||
echo "$output" | ||
if [[ "$output" != *"${{ matrix.compiler }}"* ]]; then | ||
echo "COMPILER '${{ matrix.compiler }}'' variable not used by the make file!" | ||
#exit 1 | ||
fi | ||
- name: Compile | ||
shell: bash | ||
env: | ||
COMPILER: ${{ matrix.compiler }} | ||
run: ${{ matrix.make_tool }} | ||
|
||
- name: Tests | ||
shell: bash | ||
run: | | ||
./gsw_check |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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