Compare commits

..

9 Commits

Author SHA1 Message Date
s1d3sw1ped
777ed46879 Merge pull request 'develop' (#15) from develop into master
All checks were successful
CI / Lint (push) Successful in 43s
CI / Test (push) Successful in 3m43s
CI / Build (push) Successful in 4m19s
Reviewed-on: #15
2024-03-10 21:47:43 +00:00
89dedb9870 oops
All checks were successful
CI / Lint (push) Successful in 48s
CI / Lint (pull_request) Successful in 1m12s
CI / Test (push) Successful in 5m27s
CI / Test (pull_request) Successful in 5m9s
CI / Build (push) Successful in 6m3s
CI / Build (pull_request) Successful in 5m12s
2024-03-10 16:36:44 -05:00
57d8c1b330 fix test and build ci
Some checks failed
CI / Lint (push) Successful in 33s
CI / Lint (pull_request) Successful in 1m6s
CI / Build (push) Failing after 5m33s
CI / Test (push) Successful in 5m46s
CI / Build (pull_request) Failing after 4m35s
CI / Test (pull_request) Successful in 5m27s
2024-03-10 16:24:56 -05:00
4c1de974f0 major ci change
Some checks failed
CI / Lint (push) Successful in 1m14s
CI / Test (push) Failing after 1m7s
CI / Lint (pull_request) Successful in 1m8s
CI / Test (pull_request) Failing after 48s
CI / Build (push) Failing after 4m7s
CI / Build (pull_request) Failing after 3m8s
2024-03-10 16:10:59 -05:00
452fe85d26 Merge branch 'develop' of ssh://git.s1d3sw1ped.com:2222/s1d3sw1ped/SwipedModSwitcher into develop
All checks were successful
pull request validation / build and run tests (pull_request) Successful in 3m25s
2024-03-10 15:12:07 -05:00
8de631afa2 no need to checkout the entire repo 2024-03-10 15:12:00 -05:00
s1d3sw1ped
242df40852 Merge branch 'master' into develop
Some checks failed
pull request validation / build and run tests (pull_request) Has been cancelled
build and test / artifact builds on linux and windows (push) Has been cancelled
2024-03-10 19:05:21 +00:00
2c6a8ac7b0 Merge branch 'develop' of ssh://git.s1d3sw1ped.com:2222/s1d3sw1ped/SwipedModSwitcher into develop
Some checks failed
build and test / artifact builds on linux and windows (push) Has been cancelled
pull request validation / build and run tests (pull_request) Successful in 4m1s
2024-03-10 14:04:48 -05:00
95caed9b33 fyne cant follow golangs example with getting deps for builds 2024-03-10 14:04:10 -05:00
4 changed files with 141 additions and 126 deletions

View File

@@ -1,56 +0,0 @@
name: build and test
on:
push:
branches:
- "master"
- "develop"
jobs:
build:
name: artifact builds on linux and windows
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: setup-dependencies
run: |
apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: get fyne
run: |
go get fyne.io/fyne/v2@latest
go install fyne.io/fyne/v2/cmd/fyne@latest
- name: build linux
run: |
BUILD=${{github.run_number}}
GOOS=windows
GOARCH=amd64
GOFLAGS="-ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=gcc
fyne package --appBuild=${BUILD} --exe bin/swiped-mod-switcher-$VERSION-linux-amd64 main.go
- name: build windows
run: |
BUILD=${{github.run_number}}
GOOS=windows
GOARCH=amd64
GOFLAGS="-ldflags=-H=windowsgui -ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=x86_64-w64-mingw32-gcc
fyne package --appBuild=${BUILD} --exe bin/swiped-mod-switcher-$VERSION-windows-amd64.exe main.go
- uses: actions/upload-artifact@v3
with:
name: swiped-mod-switcher-${{github.ref_name}}
path: bin/

124
.gitea/workflows/ci.yaml Normal file
View File

@@ -0,0 +1,124 @@
name: CI
on:
push:
branches: [master, develop]
pull_request:
jobs:
lint:
name: Lint
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
checks: write
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --verbose
test:
name: Test
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Setup OS dependencies
run: |
apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: Get fyne command
run: |
go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Get go dependencies
run: |
go mod tidy
- name: Test
run: go test -race -v -shuffle=on ./...
build:
name: Build
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Setup OS dependencies
run: |
apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: Get fyne command
run: |
go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Get go dependencies
run: |
go mod tidy
- name: Build for linux
run: |
fyne package --appBuild=${BUILD} --exe bin/swiped-mod-switcher-${VERSION}.${BUILD}-${GOOS}-${GOARCH}${EXE} main.go
env:
BUILD: ${{github.run_number}}
GOOS: linux
GOARCH: amd64
EXE: ""
CGO_ENABLED: 1
CC: gcc
- name: Build for windows
run: |
fyne package --appBuild=${BUILD} --exe bin/swiped-mod-switcher-${VERSION}.${BUILD}-${GOOS}-${GOARCH}${EXE} main.go
env:
BUILD: ${{github.run_number}}
GOOS: windows
GOARCH: amd64
EXE: .exe
CGO_ENABLED: 1
CC: x86_64-w64-mingw32-gcc
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: swiped-mod-switcher-${{github.ref_name}}
path: bin/

View File

@@ -1,52 +0,0 @@
name: pull request validation
on:
pull_request:
branches:
- master
- develop
jobs:
build:
name: build and run tests
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: setup dependencies
run: |
apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: get fyne
run: |
go get fyne.io/fyne/v2@latest
go install fyne.io/fyne/v2/cmd/fyne@latest
- name: build
run: |
GOOS=linux
GOARCH=amd64
GOFLAGS="-ldflags=-s -ldflags=-w"
CGO_ENABLED=1
CC=gcc
fyne package --exe bin/swiped-mod-switcher-${VERSION}.${BUILD}-linux-amd64 main.go
- name: run tests
run: go test -v ./...
- name: Check Vet
run: go vet ./...
- name: check formatting
run: |-
gofmt -s -l .
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: check lint
uses: golangci/golangci-lint-action@v3
with:
version: latest

View File

@@ -1,4 +1,4 @@
name: release-tag name: Release versioned tag
on: on:
push: push:
tags: tags:
@@ -6,51 +6,50 @@ on:
jobs: jobs:
release: release:
name: Build versioned release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0 - name: Setup go
- name: setup go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version-file: 'go.mod' go-version-file: 'go.mod'
- name: setup-dependencies
- name: Setup OS dependencies
run: | run: |
apt-get update apt-get update
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
- name: get fyne - name: Install fyne command
run: | run: |
go get fyne.io/fyne/v2@latest
go install fyne.io/fyne/v2/cmd/fyne@latest go install fyne.io/fyne/v2/cmd/fyne@latest
- name: build linux - name: Install go dependencies
run: go mod tidy
- name: Build for linux
run: | run: |
VERSION=${{github.ref_name}} VERSION=${{github.ref_name}}
BUILD=${{github.run_number}} BUILD=${{github.run_number}}
GOOS=linux
GOARCH=amd64
GOFLAGS="-ldflags=-s -ldflags=-w" GOFLAGS="-ldflags=-s -ldflags=-w"
CGO_ENABLED=1 CGO_ENABLED=1
CC=gcc CC=gcc
fyne package --appVersion=${VERSION#v} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION}.${BUILD}-linux-amd64 main.go fyne package --os linux --release --appVersion=${VERSION#v} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION}.${BUILD}-linux-amd64 main.go
- name: build windows - name: Build for windows
run: | run: |
VERSION=${{github.ref_name}} VERSION=${{github.ref_name}}
BUILD=${{github.run_number}} BUILD=${{github.run_number}}
GOOS=windows
GOARCH=amd64
GOFLAGS="-ldflags=-H=windowsgui -ldflags=-s -ldflags=-w" GOFLAGS="-ldflags=-H=windowsgui -ldflags=-s -ldflags=-w"
CGO_ENABLED=1 CGO_ENABLED=1
CC=x86_64-w64-mingw32-gcc CC=x86_64-w64-mingw32-gcc
fyne package --appVersion=${VERSION#v} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION}.${BUILD}-windows-amd64.exe main.go fyne package --os windows --release --appVersion=${VERSION#v} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION}.${BUILD}-windows-amd64.exe main.go
- name: add release binaries - name: Release binaries
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main
with: with:
files: |- files: |-
bin/** bin/**
api_key: '${{secrets.RELEASE_TOKEN}}' api_key: '${{secrets.RELEASE_TOKEN}}'