feat: collect to zip #1581
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- uses: golangci/golangci-lint-action@v6 | |
with: { version: 'v1.61' } | |
backwards-compatibility: | |
name: Backwards Compatibility | |
runs-on: windows-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.17' } | |
- uses: actions/checkout@v4 | |
with: { path: repo } | |
- name: Load Modules | |
run: | | |
go mod download | |
go mod vendor | |
shell: bash | |
working-directory: repo | |
- name: Move packages | |
run: | | |
mkdir -p path | |
mv repo/vendor path/src | |
mkdir -p path/src/github.com/forensicanalysis | |
mv repo path/src/github.com/forensicanalysis/artifactcollector | |
cp -r path/src/github.com/forensicanalysis/artifactcollector/build/go path/src | |
shell: bash | |
- name: Build with go 1.9.7 | |
run: | | |
mkdir -p go1.9.7 | |
curl -Lso go1.9.7.windows-amd64.zip https://golang.org/dl/go1.9.7.windows-amd64.zip | |
unzip -q go1.9.7.windows-amd64.zip -d go1.9.7 | |
GOPATH=$GITHUB_WORKSPACE/path GOROOT=$GITHUB_WORKSPACE/go1.9.7/go go1.9.7/go/bin/go build -o artifactcollectorxp.exe github.com/forensicanalysis/artifactcollector | |
shell: bash | |
- name: Build with go 1.2.2 | |
run: | | |
mkdir -p go1.2.2 | |
curl -Lso go1.2.2.windows-amd64.zip https://golang.org/dl/go1.2.2.windows-amd64.zip | |
unzip -q go1.2.2.windows-amd64.zip -d go1.2.2 | |
GOPATH=$GITHUB_WORKSPACE/path GOROOT=$GITHUB_WORKSPACE/go1.2.2/go go1.2.2/go/bin/go build -o artifactcollector2k.exe github.com/forensicanalysis/artifactcollector | |
shell: bash | |
win2k: | |
name: artifactcollector (win2k) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.17' } | |
- uses: actions/checkout@v4 | |
- run: make build-win2k | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (Windows 2000, 32bit) | |
path: build/bin/artifactcollector2k.exe | |
winxp: | |
name: artifactcollector (winxp) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.17' } | |
- uses: actions/checkout@v4 | |
with: { path: repo } | |
- run: make build-winxp | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (Windows XP, 32bit) | |
path: build/bin/artifactcollectorxp.exe | |
artifactcollector: | |
name: artifactcollector | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
fail-fast: false | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.17' } | |
- uses: actions/checkout@v4 | |
- run: make test | |
shell: bash | |
- name: Add Windows syso File | |
run: mv build/win/artifactcollector.syso artifactcollector.syso | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
- run: go build . | |
shell: bash | |
- run: go install . | |
shell: bash | |
- name: Remove Windows syso File | |
run: rm artifactcollector.syso | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
- name: Move Binary | |
run: | | |
mkdir bin output | |
mv artifactcollector* bin | |
mv *.zip output | |
shell: bash | |
- name: Upload artifactcollector | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector ${{ matrix.os }} | |
path: bin | |
- name: Upload output | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output ${{ matrix.os }} | |
path: output |