refactor: include doublestar #1619
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: | |
release: { types: [ published ] } | |
jobs: | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: make install generate-win fmt | |
- run: git diff --exit-code | |
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' } | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
fail-fast: false | |
defaults: { run: { shell: bash } } | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: make test | |
backwards-compatibility: | |
name: backwards-compatibility | |
runs-on: windows-latest | |
defaults: { run: { shell: bash } } | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
with: { path: repo } | |
- run: go mod vendor | |
working-directory: repo | |
- name: Move packages | |
run: | | |
mkdir -p path | |
mv repo/vendor path/src | |
mkdir -p path/src/github.com/forensicanalysis | |
mv repo/build/go/context path/src | |
mkdir -p path/src/io | |
mv repo/build/go/fs path/src/io | |
mv repo path/src/github.com/forensicanalysis/artifactcollector | |
find path | |
- 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 | |
- 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 | |
linux: | |
name: artifactcollector (linux) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: go build . | |
- run: zip -r linux.zip artifactcollector | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (linux) | |
path: linux.zip | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: linux.zip | |
if: github.event_name == 'release' | |
- run: sudo ./artifactcollector | |
- name: move files | |
run: | | |
mkdir output | |
mv *.zip output | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: output linux | |
path: output | |
macos: | |
name: artifactcollector (macos) | |
runs-on: macos-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: go build . | |
- run: zip -r macos.zip artifactcollector | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (macos) | |
path: macos.zip | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: macos.zip | |
if: github.event_name == 'release' | |
- run: sudo ./artifactcollector | |
- name: move files | |
run: | | |
mkdir output | |
mv *.zip output | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: output macos | |
path: output | |
win: | |
name: artifactcollector (win) | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: make build-win | |
- run: 7z a windows.zip ./build/bin/artifactcollector.exe | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (windows) | |
path: windows.zip | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: windows.zip | |
if: github.event_name == 'release' | |
- run: ./build/bin/artifactcollector.exe | |
- name: move files | |
run: | | |
mkdir output | |
mv *.zip output | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: output windows | |
path: output | |
win2k: | |
name: artifactcollector (win2k) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: make build-win2k | |
- run: mv ./build/bin/artifactcollector2k.exe ./artifactcollector2k.exe | |
- run: zip -r win2k.zip ./artifactcollector2k.exe | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (Windows 2000, 32bit) | |
path: win2k.zip | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: win2k.zip | |
if: github.event_name == 'release' | |
winxp: | |
name: artifactcollector (winxp) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: { go-version: '1.23' } | |
- uses: actions/checkout@v4 | |
- run: make build-winxp | |
- run: mv ./build/bin/artifactcollectorxp.exe ./artifactcollectorxp.exe | |
- run: zip -r winxp.zip ./artifactcollectorxp.exe | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifactcollector (Windows XP, 32bit) | |
path: winxp.zip | |
- uses: softprops/action-gh-release@v2 | |
with: | |
files: winxp.zip | |
if: github.event_name == 'release' |