Skip to content

Commit

Permalink
feat: Go cache
Browse files Browse the repository at this point in the history
feat: move windows WF
feat: move packaging
  • Loading branch information
kuisathaverat committed Jul 21, 2023
1 parent 949eb37 commit 7211283
Show file tree
Hide file tree
Showing 34 changed files with 104 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-audtibeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check-default
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-dev-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install libpcap-dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install libsystemd-dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install libpcap-dev
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/check-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand All @@ -41,6 +42,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: unitTest
working-directory: ${{ env.BEAT_MODULE }}
run: |
Expand All @@ -49,6 +51,7 @@ jobs:
goIntegTest:
runs-on: ubuntu-latest
needs: unitTest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -59,6 +62,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: goIntegTest
working-directory: ${{ env.BEAT_MODULE }}
run: |
Expand All @@ -67,6 +71,7 @@ jobs:
pythonIntegTest:
runs-on: ubuntu-latest
needs: unitTest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -77,6 +82,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: pythonIntegTest
working-directory: ${{ env.BEAT_MODULE }}
run: |
Expand All @@ -85,6 +91,7 @@ jobs:
crosscompile:
runs-on: ubuntu-latest
needs: unitTest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -95,8 +102,72 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: crosscompile
working-directory: ${{ env.BEAT_MODULE }}
run: |
go install github.com/magefile/mage
make crosscompile
windows-2022:
runs-on: windows-2022
needs: unitTest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: ./libbeat/tests/system/requirements.txt
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: windows-2022
working-directory: ${{ env.BEAT_MODULE }}
run: |
go install github.com/magefile/mage
mage build unitTest
windows-2019:
runs-on: windows-2019
needs: unitTest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: ./libbeat/tests/system/requirements.txt
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: windows-2019
working-directory: ${{ env.BEAT_MODULE }}
run: |
go install github.com/magefile/mage
mage build unitTest
packaging-linux:
# TODO upload packages to GCS Bucket
runs-on: ubuntu-latest
needs: unitTest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: ./libbeat/tests/system/requirements.txt
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: packaging-linux
working-directory: ${{ env.BEAT_MODULE }}
run: |
go install github.com/magefile/mage
make package
env:
PLATFORMS: "+all linux/arm64 linux/amd64 windows/amd64 darwin/amd64 darwin/arm64"
1 change: 1 addition & 0 deletions .github/workflows/check-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install libpcap-dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install librpm-dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-dockerlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install libpcap-dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-functionbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-osquerybeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Update package lists
run: sudo apt-get update
- name: Install libpcap-dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-xpack-winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- name: Run check/update
uses: magefile/mage-action@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum

- name: golangci-lint
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand All @@ -31,7 +32,7 @@ jobs:
- name: Run build
run: cd ${{ env.BEAT_MODULE }} && mage build
- name: Run test
run: cd ${{ env.BEAT_MODULE }} && echo "See https://github.com/elastic/beats/issues/29038"
run: cd ${{ env.BEAT_MODULE }} && mage unitTest
- uses: v1v/otel-upload-test-artifact-action@v2
if: always()
continue-on-error: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-functionbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-osquerybeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-xpack-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
cache-dependency-path: ./go.sum
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
Expand Down
Loading

0 comments on commit 7211283

Please sign in to comment.