Skip to content

Commit

Permalink
Merge branch 'ARM-software:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 authored Sep 12, 2023
2 parents 67b3bdc + f1d93b9 commit 866d91b
Show file tree
Hide file tree
Showing 201 changed files with 35,397 additions and 2,012 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
rebase-strategy: disabled
127 changes: 64 additions & 63 deletions .github/workflows/eventlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,22 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
go_version: 1.19.3

jobs:
build:
if: |
github.event_name != 'release' ||
startsWith(github.ref, 'refs/tags/tools/eventlist/')
strategy:
matrix:
os: [ubuntu-20.04]
name: 'Build'
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install go ${{ env.go_version }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: Initialize CodeQL
if: github.event_name != 'release'
Expand All @@ -47,33 +42,23 @@ jobs:
languages: go
queries: security-and-quality

- name: Create build folder
run: mkdir build
working-directory: ./tools/eventlist

- name: Generate version information
run: |
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo
go generate
working-directory: ./tools/eventlist

- name: Build linux-amd64 executable
run: |
GOOS=linux GOARCH=amd64 go build -o linux-amd64/eventlist ./..
working-directory: ./tools/eventlist/build
./make.sh build -os linux -arch amd64 -outdir build/linux-amd64
working-directory: ./tools/eventlist

- name: Perform CodeQL Analysis
if: github.event_name != 'release'
uses: github/codeql-action/analyze@v2

- name: Build remaining executables
run: |
GOOS=linux GOARCH=arm64 go build -o linux-arm64/eventlist ./..
GOOS=darwin GOARCH=amd64 go build -o darwin-amd64/eventlist ./..
GOOS=darwin GOARCH=arm64 go build -o darwin-arm64/eventlist ./..
GOOS=windows GOARCH=amd64 go build -o windows-amd64/eventlist.exe ./..
working-directory: ./tools/eventlist/build

./make.sh build -os linux -arch arm64 -outdir build/linux-arm64
./make.sh build -os darwin -arch amd64 -outdir build/darwin-amd64
./make.sh build -os darwin -arch arm64 -outdir build/darwin-arm64
./make.sh build -os windows -arch amd64 -outdir build/windows-amd64
./make.sh build -os windows -arch arm64 -outdir build/windows-arm64
working-directory: ./tools/eventlist

- name: Archive eventlist
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -115,23 +100,29 @@ jobs:
retention-days: 1
if-no-files-found: error

- name: Archive eventlist
uses: actions/upload-artifact@v3
with:
name: eventlist-windows-arm64
path: ./tools/eventlist/build/windows-arm64
retention-days: 1
if-no-files-found: error

lint:
if: github.event_name == 'pull_request'
name: Lint
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Setup go ${{ env.go_version }}
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}

- name: Check out repository code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -142,18 +133,16 @@ jobs:
format:
if: github.event_name != 'pull_request'
name: Format
strategy:
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install go ${{ env.go_version }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: Create build folder
run: mkdir build
Expand All @@ -167,25 +156,23 @@ jobs:

vulnerability-check:
name: "Vulnerability check"
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install go ${{ env.go_version }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
run: go install golang.org/x/vuln/cmd/govulncheck@v0.1.0

- name: Run vulnerability check
run: |
echo "$(govulncheck ./... 2>&1 | tee vulnerability_report.out)"
echo "$(govulncheck ./... 2>&1 | tee vulnerability_report.out)"
test -n "$(grep 'No vulnerabilities found.' vulnerability_report.out)"
working-directory: ./tools/eventlist

Expand All @@ -196,17 +183,18 @@ jobs:
needs: [ build ]
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-12]
os: [ubuntu-latest, windows-latest, macos-latest]
name: 'Test (${{ matrix.os }})'
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install go ${{ env.go_version }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: Create build folder
run: mkdir build
Expand All @@ -231,24 +219,24 @@ jobs:
if: github.event_name != 'release'
name: "Publish Tests Results"
needs: [ test ]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Download unit test report windows
uses: actions/download-artifact@v3
with:
name: unit-test-result-windows-2019
name: unit-test-result-windows-latest
path: testreports/

- name: Download unit test report linux
uses: actions/download-artifact@v3
with:
name: unit-test-result-ubuntu-20.04
name: unit-test-result-ubuntu-latest
path: testreports/

- name: Download unit test report macos
uses: actions/download-artifact@v3
with:
name: unit-test-result-macos-12
name: unit-test-result-macos-latest
path: testreports/

- name: publish test results
Expand All @@ -263,19 +251,17 @@ jobs:
github.event_name != 'release' ||
startsWith(github.ref, 'refs/tags/tools/eventlist/')
needs: [ build ]
strategy:
matrix:
os: [ubuntu-20.04]
name: 'Coverage check'
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install go ${{ env.go_version }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
go-version-file: tools/eventlist/go.mod
check-latest: true

- name: Create build folder
run: mkdir build
Expand Down Expand Up @@ -309,16 +295,19 @@ jobs:
mkdir -p release/eventlist-darwin-amd64/docs
mkdir -p release/eventlist-darwin-arm64/docs
mkdir -p release/eventlist-windows-amd64/docs
mkdir -p release/eventlist-windows-arm64/docs
cp LICENSE release/eventlist-linux-amd64/
cp LICENSE release/eventlist-linux-arm64/
cp LICENSE release/eventlist-darwin-amd64/
cp LICENSE release/eventlist-darwin-arm64/
cp LICENSE release/eventlist-windows-amd64/
cp LICENSE release/eventlist-windows-arm64/
cp tools/eventlist/docs/* release/eventlist-linux-amd64/docs/
cp tools/eventlist/docs/* release/eventlist-linux-arm64/docs/
cp tools/eventlist/docs/* release/eventlist-darwin-amd64/docs/
cp tools/eventlist/docs/* release/eventlist-darwin-arm64/docs/
cp tools/eventlist/docs/* release/eventlist-windows-amd64/docs/
cp tools/eventlist/docs/* release/eventlist-windows-arm64/docs/
- name: Download eventlist linux
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -350,9 +339,20 @@ jobs:
name: eventlist-windows-amd64
path: release/eventlist-windows-amd64/

- name: Download eventlist windows
uses: actions/download-artifact@v2
with:
name: eventlist-windows-arm64
path: release/eventlist-windows-arm64/

- name: Zip folders
run: |
# Ensure executable eventlist due to this limitation
# https://github.com/actions/upload-artifact#permission-loss
chmod +x */eventlist*
zip -r eventlist-windows-amd64.zip eventlist-windows-amd64/eventlist.exe eventlist-windows-amd64/docs eventlist-windows-amd64/LICENSE
zip -r eventlist-windows-arm64.zip eventlist-windows-arm64/eventlist.exe eventlist-windows-arm64/docs eventlist-windows-arm64/LICENSE
tar -czvf eventlist-linux-amd64.tar.gz eventlist-linux-amd64/eventlist eventlist-linux-amd64/docs eventlist-linux-amd64/LICENSE
tar -czvf eventlist-linux-arm64.tar.gz eventlist-linux-arm64/eventlist eventlist-linux-arm64/docs eventlist-linux-arm64/LICENSE
tar -czvf eventlist-darwin-amd64.tar.gz eventlist-darwin-amd64/eventlist eventlist-darwin-amd64/docs eventlist-darwin-amd64/LICENSE
Expand All @@ -362,6 +362,7 @@ jobs:
- name: Calculate checksums
run: |
sha256sum eventlist-windows-amd64.zip --text > eventlist-checksums.txt
sha256sum eventlist-windows-arm64.zip --text >> eventlist-checksums.txt
sha256sum eventlist-linux-amd64.tar.gz --text >> eventlist-checksums.txt
sha256sum eventlist-linux-arm64.tar.gz --text >> eventlist-checksums.txt
sha256sum eventlist-darwin-amd64.tar.gz --text >> eventlist-checksums.txt
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [gh-pages]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
10 changes: 10 additions & 0 deletions .github/workflows/pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@ on:
branches: [ main ]
paths:
- '.github/workflows/pack.yml'
- 'ARM.CMSIS-View.pdsc'
- 'gen_pack.sh'
- 'Documentation/**'
- 'Doxygen/**'
- 'EventRecorder/**'
- 'Examples/**'
- 'Fault/**'
- 'Schema/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/pack.yml'
- 'ARM.CMSIS-View.pdsc'
- 'gen_pack.sh'
- 'Documentation/**'
- 'Doxygen/**'
- 'EventRecorder/**'
- 'Examples/**'
- 'Fault/**'
- 'Schema/**'
release:
types: [published]

Expand Down
Loading

0 comments on commit 866d91b

Please sign in to comment.