Bump actions/setup-dotnet from 3 to 4 #190
Workflow file for this run
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: " Compile CPlus" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'cplus/**' | |
- '.github/**' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build-darwin: | |
name: MacOS(Intel&ARM) | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: compile CPlus binary for macOS | |
run: | | |
mkdir target | |
echo "Compiling CPlus for Intel Macos-X" | |
(cd cplus && make CXXFLAGS+='-target x86_64-apple-macos12' OUT='../target/wrongsecrets-cplus') | |
echo "Compiling CPlus for ARM Macos-X" | |
(cd cplus && make CXXFLAGS+='-target arm64-apple-macos12' OUT='../target/wrongsecrets-cplus-arm') | |
- name: Uploading executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-CPlus-MacOS | |
path: target/* | |
build-linux: | |
name: Linux(X86-64) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile CPlus binary for Linux(x64) | |
run: | | |
mkdir target | |
echo "Compiling CPlus for Linux-x64" | |
g++ cplus/main.cpp -o target/wrongsecrets-cplus-linux | |
- name: Uploading executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-CPlus-linux-x64 | |
path: target/* | |
build-linux-arm: | |
name: Linux(ARM64) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile C binary for Linux(ARM) | |
run: | | |
mkdir target | |
echo "Prepare env" | |
git clone --depth 1 https://github.com/dockcross/dockcross.git | |
cd dockcross | |
docker run --rm dockcross/linux-arm64-lts > ./dockcross-linux-arm64-lts | |
chmod +x ./dockcross-linux-arm64-lts && mv ./dockcross-linux-arm64-lts .. && cd .. | |
echo "Compiling C for Linux-arm" | |
./dockcross-linux-arm64-lts bash -c 'g++ cplus/main.cpp -o target/wrongsecrets-cplus-linux-arm' | |
- name: Uploading executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-CPlus-linux-ARM | |
path: target/* | |
build-windows: | |
name: Windows(x86-64) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile C binary for Windows | |
run: | | |
mkdir target | |
echo "Prepare env" | |
git clone --depth 1 https://github.com/dockcross/dockcross.git | |
cd dockcross | |
docker run --rm dockcross/windows-static-x64 > ./dockcross-windows-static-x64 | |
chmod +x ./dockcross-windows-static-x64 && mv ./dockcross-windows-static-x64 .. && cd .. | |
echo "Compiling CPlus for Windows" | |
./dockcross-windows-static-x64 bash -c 'g++ cplus/main.cpp -o target/wrongsecrets-cplus-windows' | |
- name: Uploading executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-CPlus-Windows | |
path: target/* | |
build-musl-arm: | |
name: Musl(ARM) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile Cplus binary for Musl(ARM) | |
run: | | |
mkdir target | |
echo "Prepare env" | |
git clone --depth 1 https://github.com/dockcross/dockcross.git | |
cd dockcross | |
docker run --rm dockcross/linux-arm64-musl > ./dockcross-linux-arm64-musl | |
chmod +x ./dockcross-linux-arm64-musl && mv ./dockcross-linux-arm64-musl .. && cd .. | |
echo "Compiling Cplus for Arm Musl" | |
./dockcross-linux-arm64-musl bash -c 'g++ cplus/main.cpp -lstdc++ -o target/wrongsecrets-cplus-linux-musl-arm' | |
- name: Uploading executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-Cplus-Musl-ARM | |
path: target/* | |
build-musl-x64: | |
name: Musl(X86-64) | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Compile Cplus binary for Musl(x64) | |
run: | | |
mkdir target | |
echo "Prepare env" | |
brew install FiloSottile/musl-cross/musl-cross | |
ln -s /usr/local/opt/musl-cross/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc | |
echo "Compiling Cplus for X64 Musl" | |
x86_64-linux-musl-gcc cplus/main.cpp -lstdc++ -o target/wrongsecrets-cplus-linux-musl | |
- name: Uploading executables | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executable-Cplus-Musl-x64 | |
path: target/* |