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

Update CI #29

Closed
wants to merge 10 commits into from
Closed
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
133 changes: 89 additions & 44 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,105 @@ on:
pull_request:
branches: [ "main" ]

env:
GO_VERSION: '1.20'

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Install libfido2-dev
run: sudo apt-get install -y libfido2-dev
- name: Install gio dependencies
run: sudo apt-get install -y gcc pkg-config
- name: Build
run: go build -v .
- name: Test
run: go test -v .
- uses: actions/upload-artifact@v3
with:
name: goldwarden-linux
path: ./goldwarden
# build_linux_x86_64:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Install libfido2-dev
# run: sudo apt-get install -y libfido2-dev
# - name: Build
# run: go build -o goldwarden_linux_x86_64 -v .
# - uses: actions/upload-artifact@v3
# with:
# name: goldwarden_linux_x86_64
# path: ./goldwarden_linux_x86_64

# build_linux_arm64:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Install libfido2-dev
# run: sudo apt-get install -y libfido2-dev
# - name: Build minimal arm64 featureset
# run: GOARCH=arm64 go build -tags nofido2 -o goldwarden_linux_arm64 -v .
# - uses: actions/upload-artifact@v3
# with:
# name: goldwarden_linux_arm64
# path: ./goldwarden_linux_arm64

# build_linux_x86:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Build minimal x86 featureset
# run: GOARCH=386 go build -tags nofido2 -o goldwarden_linux_x86 -v .
# - uses: actions/upload-artifact@v3
# with:
# name: goldwarden_linux_x86
# path: ./goldwarden_linux_x86

macos:
# build_macos_x86_64:
# runs-on: macos-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Build
# run: go build -tags "nofido2" -o "goldwarden_macos_x86_64" -v .
# - uses: actions/upload-artifact@v3
# with:
# name: goldwarden-macos_x86_64
# path: ./goldwarden_macos_x86_64

build_macos_arm64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
- name: Install zig
run: brew install zig
- name: Build
run: go build -tags "nofido2" -v .
- name: Test
run: go test -tags "nofido2" -v .
run: CGO_ENABLED=1 CC="zcc" CXX="zxx" GOARCH=arm64 go build -tags "nofido2" -o "goldwarden_macos_arm64" -v .
- uses: actions/upload-artifact@v3
with:
name: goldwarden-macos
path: ./goldwarden
name: goldwarden-macos_arm64
path: ./goldwarden_macos_arm64

windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: go build -tags "nofido2" -v .
- name: Test
run: go test -tags "nofido2" -v .
- uses: actions/upload-artifact@v3
with:
name: goldwarden-windows.exe
path: ./goldwarden.exe
# build_windows_x86_64:
# runs-on: windows-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Build
# run: go build -tags "nofido2" -o "goldwarden_windows_x86_64.exe" -v .
# - uses: actions/upload-artifact@v3
# with:
# name: goldwarden-windows_x86_64.exe
# path: ./goldwarden_windows_x86_64.exe
59 changes: 56 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ permissions:
contents: write
packages: write

env:
GO_VERSION: 1.20

jobs:
build_linux:
build_linux_x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -88,6 +91,40 @@ jobs:
files: './*.rpm'
repo-token: ${{ secrets.GITHUB_TOKEN }}

build_linux_arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Install libfido2-dev
run: sudo apt-get install -y libfido2-dev
- name: Build minimal arm64 featureset
run: GOARCH=arm64 go build -tags nofido2 -o goldwarden_linux_arm64 -v .
- uses: AButler/[email protected]
with:
files: './goldwarden_linux_arm64'
repo-token: ${{ secrets.GITHUB_TOKEN }}

build_linux_x86:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Build minimal x86 featureset
run: GOARCH=386 go build -tags nofido2 -o goldwarden_linux_x86 -v .
- uses: AButler/[email protected]
with:
files: './goldwarden_linux_x86'
repo-token: ${{ secrets.GITHUB_TOKEN }}

build_macos_x86_64:
runs-on: macos-latest
steps:
Expand All @@ -96,13 +133,29 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
- name: Build
run: go build -tags "nofido2" -o "goldwarden_macos_x86_64" -v .
- uses: AButler/[email protected]
with:
files: './goldwarden_macos_x86_64'
repo-token: ${{ secrets.GITHUB_TOKEN }}

build_macos_arm64:
runs-on: macos-13-xlarge
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Build
run: go build -tags "nofido2" -o "goldwarden_macos_arm64" -v .
- uses: AButler/[email protected]
with:
files: './goldwarden_macos_arm64'
repo-token: ${{ secrets.GITHUB_TOKEN }}

build_windows_x86_64:
runs-on: windows-latest
Expand All @@ -112,7 +165,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
- name: Build
run: go build -tags "nofido2" -o "goldwarden_windows_x86_64.exe" -v .
- uses: AButler/[email protected]
Expand Down
Loading