Repository navigation
Bump github/codeql-action/analyze from 4.38.0 to 4.38.1 #685
Workflow file for this run
This file contains hidden or 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@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - 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: compile CTF CPlus binary for macOS | |
| run: | | |
| echo "Generating CTF secrets..." | |
| ./generate_ctf_secrets.sh generate | |
| echo "Compiling CTF CPlus for Intel Macos-X" | |
| (cd cplus && make CXXFLAGS+='-target x86_64-apple-macos12' OUT='../target/wrongsecrets-cplus-ctf') | |
| echo "Compiling CTF CPlus for ARM Macos-X" | |
| (cd cplus && make CXXFLAGS+='-target arm64-apple-macos12' OUT='../target/wrongsecrets-cplus-arm-ctf') | |
| # Restore original files | |
| ./generate_ctf_secrets.sh restore | |
| - name: Uploading executables | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: executable-CPlus-MacOS | |
| path: target/* | |
| build-linux: | |
| name: Linux(X86-64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - 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: Compile CTF CPlus binary for Linux(x64) | |
| run: | | |
| echo "Generating CTF secrets..." | |
| ./generate_ctf_secrets.sh generate | |
| echo "Compiling CTF CPlus for Linux-x64" | |
| g++ cplus/main.cpp -o target/wrongsecrets-cplus-linux-ctf | |
| # Restore original files | |
| ./generate_ctf_secrets.sh restore | |
| - name: Uploading executables | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: executable-CPlus-linux-x64 | |
| path: target/* | |
| build-linux-arm: | |
| name: Linux(ARM64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - 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: Compile CTF C binary for Linux(ARM) | |
| run: | | |
| echo "Generating CTF secrets..." | |
| ./generate_ctf_secrets.sh generate | |
| echo "Compiling CTF CPlus for Linux-arm" | |
| ./dockcross-linux-arm64-lts bash -c 'g++ cplus/main.cpp -o target/wrongsecrets-cplus-linux-arm-ctf' | |
| # Restore original files | |
| ./generate_ctf_secrets.sh restore | |
| - name: Uploading executables | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: executable-CPlus-linux-ARM | |
| path: target/* | |
| build-windows: | |
| name: Windows(x86-64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - 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: Compile CTF C binary for Windows | |
| run: | | |
| echo "Generating CTF secrets..." | |
| ./generate_ctf_secrets.sh generate | |
| echo "Compiling CTF CPlus for Windows" | |
| ./dockcross-windows-static-x64 bash -c 'g++ cplus/main.cpp -o target/wrongsecrets-cplus-windows-ctf' | |
| # Restore original files | |
| ./generate_ctf_secrets.sh restore | |
| - name: Uploading executables | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: executable-CPlus-Windows | |
| path: target/* | |
| build-musl-arm: | |
| name: Musl(ARM) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - 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: Compile CTF Cplus binary for Musl(ARM) | |
| run: | | |
| echo "Generating CTF secrets..." | |
| ./generate_ctf_secrets.sh generate | |
| echo "Compiling CTF Cplus for Arm Musl" | |
| ./dockcross-linux-arm64-musl bash -c 'g++ cplus/main.cpp -lstdc++ -o target/wrongsecrets-cplus-linux-musl-arm-ctf' | |
| # Restore original files | |
| ./generate_ctf_secrets.sh restore | |
| - name: Uploading executables | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: executable-Cplus-Musl-ARM | |
| path: target/* | |
| build-musl-x64: | |
| name: Musl(X86-64) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - 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: Compile CTF Cplus binary for Musl(x64) | |
| run: | | |
| echo "Generating CTF secrets..." | |
| ./generate_ctf_secrets.sh generate | |
| echo "Compiling CTF Cplus for X64 Musl" | |
| x86_64-linux-musl-gcc cplus/main.cpp -lstdc++ -o target/wrongsecrets-cplus-linux-musl-ctf | |
| # Restore original files | |
| ./generate_ctf_secrets.sh restore | |
| - name: Uploading executables | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: executable-Cplus-Musl-x64 | |
| path: target/* |