Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Version 2.0

Version 2.0 #10

Workflow file for this run

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++03)
run: |
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 || 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 || 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 || 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 || 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 || true
clang++ -std=c++2b -Wall -Wextra -Werror -pedantic -c password.cpp -o clang23 || true
- name: Upload build artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: .