Compare commits

...

10 Commits

Author SHA1 Message Date
Eric Coissac
f798f22434 Add cross-platform binary builds and release workflow improvements
This commit introduces a new build job that compiles binaries for multiple platforms (Linux, macOS) and architectures (amd64, arm64). It also refactors the release process to download pre-built artifacts and simplify the release directory preparation. The workflow now uses matrix strategy for building binaries and downloads all artifacts for the final release, removing the previous manual build steps for each platform.
2026-02-06 09:08:33 +01:00
coissac
248bc9f672 Merge pull request #75 from metabarcoding/push-mxxuykppzlpw
Push mxxuykppzlpw
2026-02-05 18:11:12 +01:00
Eric Coissac
7a7db703f1 Bump version to 4.4.7
Update version from 4.4.6 to 4.4.7 in version.txt and pkg/obioptions/version.go
2026-02-05 18:10:45 +01:00
Eric Coissac
da195ac5cb Optimisation de la construction des binaires
Modification du fichier de workflow de release pour compiler uniquement les outils obitools lors de la construction des binaires pour chaque plateforme (Linux AMD64, Linux ARM64, macOS AMD64, macOS ARM64, Windows AMD64). Cela permet d'optimiser le processus de build en ne générant que les binaires nécessaires.
2026-02-05 18:10:43 +01:00
coissac
20a0a09f5f Merge pull request #74 from metabarcoding/push-yqrwnpmoqllk
Push yqrwnpmoqllk
2026-02-05 18:03:28 +01:00
coissac
7d8c578c57 Merge branch 'master' into push-yqrwnpmoqllk 2026-02-05 18:03:18 +01:00
Eric Coissac
d7f615108f Bump version to 4.4.6
Update version from 4.4.5 to 4.4.6 in version.txt and pkg/obioptions/version.go
2026-02-05 18:02:30 +01:00
Eric Coissac
71574f240b Update version and add CI tests
Update version to 4.4.5 and add a test job in the release workflow to ensure tests pass before creating a release.
2026-02-05 18:02:28 +01:00
coissac
c98501a898 Merge pull request #73 from metabarcoding/push-pklkwsssrkuv
Push pklkwsssrkuv
2026-02-05 17:54:39 +01:00
Eric Coissac
23f145a4c2 Bump version to 4.4.5
Update version number from 4.4.4 to 4.4.5 in both version.go and version.txt files.
2026-02-05 17:53:53 +01:00
3 changed files with 91 additions and 68 deletions

View File

@@ -9,13 +9,48 @@ permissions:
contents: write
jobs:
create-release:
# First run tests
test:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Checkout obitools4 project
uses: actions/checkout@v4
- name: Run tests
run: make githubtests
# Build binaries for each platform
build:
needs: test
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
output_name: linux_amd64
- os: ubuntu-latest
goos: linux
goarch: arm64
output_name: linux_arm64
cross_compile: true
- os: macos-latest
goos: darwin
goarch: amd64
output_name: darwin_amd64
- os: macos-latest
goos: darwin
goarch: arm64
output_name: darwin_arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
@@ -27,71 +62,64 @@ jobs:
run: |
TAG=${GITHUB_REF#refs/tags/Release_}
echo "version=$TAG" >> $GITHUB_OUTPUT
echo "tag_name=Release_$TAG" >> $GITHUB_OUTPUT
- name: Build binaries for multiple platforms
- name: Install cross-compilation tools (Linux ARM64 only)
if: matrix.cross_compile
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build binaries
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CC: ${{ matrix.cross_compile && 'aarch64-linux-gnu-gcc' || '' }}
VERSION: ${{ steps.get_version.outputs.version }}
run: |
make obitools
mkdir -p artifacts
cd build
for binary in *; do
tar -czf ../artifacts/${binary}_${VERSION}_${{ matrix.output_name }}.tar.gz ${binary}
done
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.output_name }}
path: artifacts/*
# Create the release
create-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract version from tag
id: get_version
run: |
TAG=${GITHUB_REF#refs/tags/Release_}
echo "version=$TAG" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
- name: Prepare release directory
run: |
VERSION=${{ steps.get_version.outputs.version }}
mkdir -p release
# Get list of obitools to build
OBITOOLS=$(ls -d cmd/obitools/*/ | xargs -n 1 basename)
# Build for Linux AMD64
echo "Building for Linux AMD64..."
GOOS=linux GOARCH=amd64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_linux_amd64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for Linux ARM64
echo "Building for Linux ARM64..."
GOOS=linux GOARCH=arm64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_linux_arm64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for macOS AMD64 (Intel)
echo "Building for macOS AMD64..."
GOOS=darwin GOARCH=amd64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_darwin_amd64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for macOS ARM64 (Apple Silicon)
echo "Building for macOS ARM64..."
GOOS=darwin GOARCH=arm64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_darwin_arm64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for Windows AMD64
echo "Building for Windows AMD64..."
GOOS=windows GOARCH=amd64 make obitools
cd build
for binary in *; do
zip ../release/${binary}_${VERSION}_windows_amd64.zip ${binary}.exe
done
cd ..
find release-artifacts -type f -name "*.tar.gz" -exec cp {} release/ \;
ls -lh release/
- name: Generate Release Notes
id: release_notes
env:
VERSION: ${{ steps.get_version.outputs.version }}
run: |
VERSION=${{ steps.get_version.outputs.version }}
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
echo "# OBITools4 Release ${VERSION}" > release_notes.md
@@ -133,11 +161,6 @@ jobs:
echo "tar -xzf <tool>_${VERSION}_darwin_arm64.tar.gz" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "### Windows (AMD64)" >> release_notes.md
echo '```powershell' >> release_notes.md
echo "Expand-Archive <tool>_${VERSION}_windows_amd64.zip" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "Available tools: Replace \`<tool>\` with one of the obitools commands." >> release_notes.md
- name: Create GitHub Release

View File

@@ -3,7 +3,7 @@ package obioptions
// Version is automatically updated by the Makefile from version.txt
// The patch number (third digit) is incremented on each push to the repository
var _Version = "Release 4.4.4"
var _Version = "Release 4.4.7"
// Version returns the version of the obitools package.
//

View File

@@ -1 +1 @@
4.4.4
4.4.7