Skip to content

Commit

Permalink
Add protoc to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MEhrn00 committed Feb 17, 2024
1 parent dfc22b0 commit 90b494a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
AGENT_CODE: Payload_Type/thanatos/agent
MYTHIC_CODE: Payload_Type/thanatos/mythic


jobs:
agent:
name: Agent Code
Expand Down Expand Up @@ -39,6 +38,17 @@ jobs:
${{ runner.os }}-cargo-target-${{ hashFiles(format('{0}/Cargo.lock', env.AGENT_CODE)) }}
${{ runner.os }}-cargo-target
- name: Install protoc
if: ${{ runner.os == 'Linux' }}
run: |
mkdir -p /tmp/protoc
pushd /tmp/protoc
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip -o protoc.zip
unzip protoc.zip
mv bin/protoc /usr/local/bin
popd
rm -rf /tmp/protoc
- name: Install Clippy
run: rustup component add clippy

Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
AGENT_CODE: Payload_Type/thanatos/agent
MYTHIC_CODE: Payload_Type/thanatos/mythic


jobs:
agent:
name: Agent Tests
Expand Down Expand Up @@ -45,9 +44,24 @@ jobs:
${{ runner.os }}-cargo-target-${{ hashFiles(format('{0}/Cargo.lock', env.AGENT_CODE)) }}
${{ runner.os }}-cargo-target
- name: Install system libraries
- name: Install protoc (Linux)
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update -y && sudo apt-get install -y libdbus-1-dev
run: |
mkdir -p /tmp/protoc
pushd /tmp/protoc
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip -o protoc.zip
unzip protoc.zip
mv bin/protoc /usr/local/bin
popd
rm -rf /tmp/protoc
- name: Install protoc (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-win64.zip -OutFile protoc.zip
Expand-Archive protoc.zip
Copy-Item -Path .\protoc\bin\protoc.exe -Destination $env:SYSTEMROOT\System32\protoc.exe
Remove-Item -Recurse .\protoc
- name: Run tests
run: |
Expand Down

0 comments on commit 90b494a

Please sign in to comment.