Compare commits
4
Commits
959b6793da
..
v0.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1d5ac8f98 | ||
|
|
f1337e824e | ||
|
|
51d6e24122 | ||
|
|
066f316dc6 |
No files matched your search
@@ -15,12 +15,16 @@ jobs:
|
|||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
# cmd/gui (Fyne) uses cgo and links against the system's OpenGL/X11
|
# cmd/gui (Fyne) uses cgo and links against the system's OpenGL/X11
|
||||||
# libraries, so building or testing ./... needs these present even
|
# *and* Wayland libraries (go-gl/glfw compiles in both backends), so
|
||||||
# though the GUI itself never opens a window in CI.
|
# building or testing ./... needs all of these present even though
|
||||||
|
# the GUI itself never opens a window in CI. Found by a real failure
|
||||||
|
# here, not guessed: go vet failed with "wayland-client-core.h: No
|
||||||
|
# such file or directory" when only libgl1-mesa-dev/xorg-dev were
|
||||||
|
# installed.
|
||||||
- name: Install system dependencies for the Fyne GUI build
|
- name: Install system dependencies for the Fyne GUI build
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libgl1-mesa-dev xorg-dev
|
sudo apt-get install -y libgl1-mesa-dev xorg-dev libwayland-dev libxkbcommon-dev
|
||||||
|
|
||||||
- name: gofmt
|
- name: gofmt
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
|
# Built with their final release filenames directly (rather than a
|
||||||
|
# generic name plus a separate archive step), so what comes out of
|
||||||
|
# dist/ is exactly what gets uploaded: raw executables, no zip/tar.gz.
|
||||||
|
# One real trade-off: a raw upload doesn't preserve the Unix
|
||||||
|
# executable bit the way a tar.gz would, so linux/darwin downloads
|
||||||
|
# need a manual `chmod +x` before running; .exe is unaffected.
|
||||||
- name: Build api and tui
|
- name: Build api and tui
|
||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
@@ -50,23 +56,14 @@ jobs:
|
|||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
ext=""
|
ext=""
|
||||||
if [ "${{ matrix.goos }}" = "windows" ]; then ext=".exe"; fi
|
if [ "${{ matrix.goos }}" = "windows" ]; then ext=".exe"; fi
|
||||||
go build -o "dist/completed-api${ext}" ./cmd/api
|
suffix="${{ matrix.goos }}_${{ matrix.goarch }}${ext}"
|
||||||
go build -o "dist/completed-tui${ext}" ./cmd/tui
|
go build -o "dist/${PROJECT_NAME}-api_${suffix}" ./cmd/api
|
||||||
|
go build -o "dist/${PROJECT_NAME}-tui_${suffix}" ./cmd/tui
|
||||||
|
|
||||||
- name: Archive
|
- uses: actions/upload-artifact@v3
|
||||||
run: |
|
|
||||||
cd dist
|
|
||||||
base="${PROJECT_NAME}_${{ matrix.goos }}_${{ matrix.goarch }}"
|
|
||||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
|
||||||
zip "../${base}.zip" completed-api.exe completed-tui.exe
|
|
||||||
else
|
|
||||||
tar czf "../${base}.tar.gz" completed-api completed-tui
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ env.PROJECT_NAME }}_${{ matrix.goos }}_${{ matrix.goarch }}
|
name: ${{ env.PROJECT_NAME }}-go_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
path: ${{ env.PROJECT_NAME }}_${{ matrix.goos }}_${{ matrix.goarch }}.*
|
path: dist/*
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
# cmd/gui (Fyne) uses cgo, so unlike build-go above it can't just cross-
|
# cmd/gui (Fyne) uses cgo, so unlike build-go above it can't just cross-
|
||||||
@@ -84,7 +81,7 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
packages: libgl1-mesa-dev xorg-dev
|
packages: libgl1-mesa-dev xorg-dev libwayland-dev libxkbcommon-dev
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
packages: gcc-mingw-w64-x86-64
|
packages: gcc-mingw-w64-x86-64
|
||||||
@@ -100,6 +97,8 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y ${{ matrix.packages }}
|
sudo apt-get install -y ${{ matrix.packages }}
|
||||||
|
|
||||||
|
# Same reasoning as build-go above: upload the raw executable, built
|
||||||
|
# with its final release name directly, no archive step.
|
||||||
- name: Build gui
|
- name: Build gui
|
||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
@@ -107,26 +106,17 @@ jobs:
|
|||||||
CGO_ENABLED: "1"
|
CGO_ENABLED: "1"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
name="dist/${PROJECT_NAME}-gui_${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||||
CC=x86_64-w64-mingw32-gcc go build -ldflags "-H=windowsgui" -o dist/completed-gui.exe ./cmd/gui
|
CC=x86_64-w64-mingw32-gcc go build -ldflags "-H=windowsgui" -o "${name}.exe" ./cmd/gui
|
||||||
else
|
else
|
||||||
go build -o dist/completed-gui ./cmd/gui
|
go build -o "${name}" ./cmd/gui
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Archive
|
- uses: actions/upload-artifact@v3
|
||||||
run: |
|
|
||||||
cd dist
|
|
||||||
base="../${PROJECT_NAME}-gui_${{ matrix.goos }}_${{ matrix.goarch }}"
|
|
||||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
|
||||||
zip "${base}.zip" completed-gui.exe
|
|
||||||
else
|
|
||||||
tar czf "${base}.tar.gz" completed-gui
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: ${{ env.PROJECT_NAME }}-gui_${{ matrix.goos }}_${{ matrix.goarch }}
|
name: ${{ env.PROJECT_NAME }}-gui_${{ matrix.goos }}_${{ matrix.goarch }}
|
||||||
path: ${{ env.PROJECT_NAME }}-gui_${{ matrix.goos }}_${{ matrix.goarch }}.*
|
path: dist/*
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
build-web:
|
build-web:
|
||||||
@@ -149,7 +139,7 @@ jobs:
|
|||||||
- name: Archive
|
- name: Archive
|
||||||
run: tar czf ${PROJECT_NAME}-web_dist.tar.gz -C web/dist/web/browser .
|
run: tar czf ${PROJECT_NAME}-web_dist.tar.gz -C web/dist/web/browser .
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.PROJECT_NAME }}-web_dist
|
name: ${{ env.PROJECT_NAME }}-web_dist
|
||||||
path: ${{ env.PROJECT_NAME }}-web_dist.tar.gz
|
path: ${{ env.PROJECT_NAME }}-web_dist.tar.gz
|
||||||
@@ -191,16 +181,19 @@ jobs:
|
|||||||
needs: [build-go, build-gui, build-web]
|
needs: [build-go, build-gui, build-web]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
merge-multiple: true
|
# v3 has no merge-multiple: downloading all artifacts (no `name`
|
||||||
|
# given) lands each one in its own artifacts/<artifact-name>/
|
||||||
|
# subdirectory, not flattened - hence `find`, not a fixed-depth
|
||||||
|
# glob, in the step below.
|
||||||
|
|
||||||
- name: Upload to the Gitea generic package registry
|
- name: Upload to the Gitea generic package registry
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ gitea.ref_name }}
|
VERSION: ${{ gitea.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
for f in artifacts/*; do
|
find artifacts -type f | while read -r f; do
|
||||||
name="$(basename "$f")"
|
name="$(basename "$f")"
|
||||||
echo "Uploading $name"
|
echo "Uploading $name"
|
||||||
curl --fail --user "${{ github.repository_owner }}:${{ secrets.TOKEN }}" \
|
curl --fail --user "${{ github.repository_owner }}:${{ secrets.TOKEN }}" \
|
||||||
|
|||||||
Reference in new issue
Block a user