This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
Change name #4
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: C++ compile tester | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
release: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
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++14) | |
run: g++ -std=c++14 -Wall -Wextra -Werror -pedantic -c password.cpp | |
- name: Compile C++ code (C++17) | |
run: g++ -std=c++17 -Wall -Wextra -Werror -pedantic -c password.cpp | |
- name: Compile C++ code (C++20) | |
run: g++ -std=c++20 -Wall -Wextra -Werror -pedantic -c password.cpp | |
- name: Compile C++ code (C++23) | |
run: g++ -std=c++23 -Wall -Wextra -Werror -pedantic -c password.cpp | |
- name: Upload build artifact | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifact | |
path: . |