Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add amd64_v2 and amd64_v3 build #38

Merged
merged 3 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
goos: [ linux ]
goarch: [ amd64, arm64, 386, riscv64, mips64, mips64le, mipsle, mips ]
goarch: [ arm64, 386, riscv64, mips64, mips64le, mipsle, mips ]
include:
# BEGIN Linux ARM 5 6 7
- goos: linux
Expand All @@ -43,13 +43,25 @@ jobs:
goarch: arm
goarm: 5
# END Linux ARM 5 6 7
# BEGIN Linux AMD64 v1 v2 v3
- goos: linux
goarch: amd64
goamd64: v1
- goos: linux
goarch: amd64
goamd64: v2
- goos: linux
goarch: amd64
goamd64: v3
# END Linux AMD64 v1 v2 v3
fail-fast: false

runs-on: ubuntu-22.04
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
GOAMD64: ${{ matrix.goamd64 }}
CGO_ENABLED: 0

steps:
Expand All @@ -73,11 +85,10 @@ jobs:
fi
echo "VERSION=$version" >> $GITHUB_OUTPUT
echo "VERSION=$version" >> $GITHUB_ENV

- name: Show workflow information
id: get_filename
run: |
export _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM\"].friendlyName" -r < install/friendly-filenames.json)
export _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM$GOAMD64\"].friendlyName" -r < install/friendly-filenames.json)
echo "GOOS: $GOOS, GOARCH: $GOARCH, RELEASE_NAME: $_NAME"
echo "ASSET_NAME=$_NAME" >> $GITHUB_OUTPUT
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
Expand All @@ -89,15 +100,13 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y clang llvm

- name: Get project dependencies
run: |
git submodule update --init --recursive
go mod download
go mod vendor

- name: Create full source ZIP archive and Signature
if: github.event_name == 'release' && matrix.goarch == 'amd64'
if: github.event_name == 'release' && matrix.goarch == 'amd64' && matrix.goamd64 == 'v1'
run: |
zip -9vr dae-full-src.zip . -x .git/\*
FILE=./dae-full-src.zip
Expand All @@ -106,7 +115,6 @@ jobs:
shasum -a 1 $FILE >>$DGST
shasum -a 256 $FILE >>$DGST
shasum -a 512 $FILE >>$DGST

- name: Build dae
run: |
mkdir -p ./build/
Expand All @@ -116,9 +124,8 @@ jobs:
export OUTPUT=build/dae-$ASSET_NAME
export VERSION=${{ steps.get_version.outputs.VERSION }}
make

- name: Smoking test
if: matrix.goarch == 'amd64'
if: matrix.goarch == 'amd64' && matrix.goamd64 == 'v1'
run: ./build/dae-$ASSET_NAME --version

- name: Create binary ZIP archive and Signature
Expand All @@ -132,7 +139,6 @@ jobs:
shasum -a 1 $FILE >>$DGST
shasum -a 256 $FILE >>$DGST
shasum -a 512 $FILE >>$DGST

- name: Upload files to Artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -202,4 +208,4 @@ jobs:
${{ steps.prep.outputs.IMAGE }}:${{ steps.prep.outputs.TAG }}
${{ steps.prep.outputs.IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
4 changes: 3 additions & 1 deletion install/friendly-filenames.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"linux-386": { "friendlyName": "linux-x86_32" },
"linux-amd64": { "friendlyName": "linux-x86_64" },
"linux-amd64v1": { "friendlyName": "linux-x86_64" },
"linux-amd64v2": { "friendlyName": "linux-x86_64_v2_sse" },
"linux-amd64v3": { "friendlyName": "linux-x86_64_v3_avx2" },
"linux-arm5": { "friendlyName": "linux-armv5" },
"linux-arm6": { "friendlyName": "linux-armv6" },
"linux-arm7": { "friendlyName": "linux-armv7" },
Expand Down