From 3f35f428b7408c64bf28d075e0e980e64b70748f Mon Sep 17 00:00:00 2001 From: Eason Lu Date: Tue, 12 Sep 2023 16:00:29 -0700 Subject: [PATCH] Update compile-test.yml Signed-off-by: Eason Lu --- .github/workflows/compile-test.yml | 42 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/compile-test.yml b/.github/workflows/compile-test.yml index c964a00..7b3d89c 100644 --- a/.github/workflows/compile-test.yml +++ b/.github/workflows/compile-test.yml @@ -17,45 +17,45 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - + - name: Install C++ compilers run: | sudo apt install -y g++ sudo apt install -y clang sudo apt install -y llvm - + - name: Compile C++ code (C++03) run: | - g++ -std=c++03 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc03 - clang++ -std=c++03 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang03 - + g++ -std=c++03 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc03 || true + clang++ -std=c++03 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang03 || true + - name: Compile C++ code (C++11) run: | - g++ -std=c++11 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc11 - clang++ -std=c++11 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang11 - + g++ -std=c++11 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc11 || true + clang++ -std=c++11 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang11 || true + - name: Compile C++ code (C++14) run: | - g++ -std=c++14 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc14 - clang++ -std=c++14 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang14 - + g++ -std=c++14 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc14 || true + clang++ -std=c++14 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang14 || true + - name: Compile C++ code (C++17) run: | - g++ -std=c++17 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc17 - clang++ -std=c++17 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang17 - + g++ -std=c++17 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc17 || true + clang++ -std=c++17 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang17 || true + - name: Compile C++ code (C++20) run: | - g++ -std=c++20 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc20 - clang++ -std=c++20 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang20 - + g++ -std=c++20 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc20 || true + clang++ -std=c++20 -Wall -Wextra -Werror -pedantic -c password.cpp -o clang20 || true + - name: Compile C++ code (C++23) run: | - g++ -std=c++23 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc23 - clng++ -std=c++2b -Wall -Wextra -Werror -pedantic -c password.cpp -o clang23 - + g++ -std=c++23 -Wall -Wextra -Werror -pedantic -c password.cpp -o gcc23 || true + clang++ -std=c++2b -Wall -Wextra -Werror -pedantic -c password.cpp -o clang23 || true + - name: Upload build artifact - if: success() + if: always() uses: actions/upload-artifact@v3 with: name: build-artifact