mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 21:30:41 +00:00
Remove Jenkinsfile, add Illumos builds to GitHub Actions, and document release process
- Deleted the Jenkinsfile, transitioning all CI workflows to GitHub Actions. - Added Illumos (OpenIndiana) build and release steps to GitHub workflows. - Created a new release pipeline triggered by version tags starting with `v`. - Updated README with release instructions using `cargo-release`.
This commit is contained in:
parent
898ec20ad8
commit
7fb3793c54
5 changed files with 122 additions and 39 deletions
77
.github/workflows/release.yml
vendored
Normal file
77
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-illumos:
|
||||
name: Build on Illumos (OpenIndiana)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build in OpenIndiana VM
|
||||
uses: vmactions/openindiana-vm@v1
|
||||
with:
|
||||
prepare: |
|
||||
pkg install -v developer/lang/rustc build-essential jq
|
||||
run: |
|
||||
cargo build --release
|
||||
mkdir -p artifacts
|
||||
cp target/release/pkg6 artifacts/
|
||||
cp target/release/pkg6repo artifacts/
|
||||
cp target/release/pkg6depotd artifacts/
|
||||
tar czf ips-illumos-x86_64.tar.gz -C artifacts .
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ips-illumos-x86_64
|
||||
path: ips-illumos-x86_64.tar.gz
|
||||
|
||||
build-linux:
|
||||
name: Build on Linux
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: |
|
||||
cargo build --release
|
||||
mkdir -p artifacts
|
||||
cp target/release/pkg6 artifacts/
|
||||
cp target/release/pkg6repo artifacts/
|
||||
cp target/release/pkg6depotd artifacts/
|
||||
tar czf ips-linux-x86_64.tar.gz -C artifacts .
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ips-linux-x86_64
|
||||
path: ips-linux-x86_64.tar.gz
|
||||
|
||||
create-release:
|
||||
name: Create GitHub Release
|
||||
needs: [build-illumos, build-linux]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download Illumos Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ips-illumos-x86_64
|
||||
- name: Download Linux Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ips-linux-x86_64
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
ips-illumos-x86_64.tar.gz
|
||||
ips-linux-x86_64.tar.gz
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
26
.github/workflows/rust.yml
vendored
26
.github/workflows/rust.yml
vendored
|
|
@ -52,7 +52,7 @@ jobs:
|
|||
|
||||
# Build the project
|
||||
build:
|
||||
name: Build
|
||||
name: Build (Linux)
|
||||
needs: [format, clippy]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
@ -85,10 +85,32 @@ jobs:
|
|||
path: target/release/
|
||||
retention-days: 1
|
||||
|
||||
# Build on Illumos (OpenIndiana)
|
||||
build-illumos:
|
||||
name: Build (Illumos)
|
||||
needs: [format, clippy]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build in OpenIndiana VM
|
||||
uses: vmactions/openindiana-vm@v1
|
||||
with:
|
||||
prepare: |
|
||||
pkg install -v developer/lang/rustc build-essential jq
|
||||
run: |
|
||||
cargo run -p xtask -- build
|
||||
cargo run -p xtask -- build -r
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ips-binaries-illumos
|
||||
path: target/release/
|
||||
retention-days: 1
|
||||
|
||||
# Run unit tests
|
||||
test:
|
||||
name: Test
|
||||
needs: [build]
|
||||
needs: [build, build-illumos]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
|
|
|
|||
|
|
@ -21,3 +21,11 @@ repository = "https://github.com/OpenFlowLabs/ips"
|
|||
readme = "README.md"
|
||||
keywords = ["packaging", "illumos"]
|
||||
authors = ["Till Wegmueller <toasterson@gmail.com>"]
|
||||
|
||||
[workspace.metadata.release]
|
||||
push = false
|
||||
tag = true
|
||||
pre-release-commit-message = "chore: Release {{version}}"
|
||||
tag-message = "chore: Release {{version}}"
|
||||
consolidate-commits = true
|
||||
shared-version = true
|
||||
|
|
|
|||
37
Jenkinsfile
vendored
37
Jenkinsfile
vendored
|
|
@ -1,37 +0,0 @@
|
|||
// This Jenkinsfile is only used for illumos builds.
|
||||
// For all other CI workflows, GitHub Actions is used (see .github/workflows/rust.yml)
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'buildserver'
|
||||
}
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder logRotator(
|
||||
daysToKeepStr: '1',
|
||||
numToKeepStr: '3'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '''
|
||||
source $HOME/.profile
|
||||
cargo version
|
||||
cargo build
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh '''
|
||||
source $HOME/.profile
|
||||
cargo version
|
||||
cargo test
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
README.md
13
README.md
|
|
@ -14,3 +14,16 @@ but some things have been added over the years which has not been properly docum
|
|||
but be advised, this is mainly intended for use within the illumos community and it's distributions.
|
||||
Big changes which are not in the current IPS will need to be carefully coordinated to not break the current
|
||||
IPS.
|
||||
|
||||
## Development and Release
|
||||
|
||||
### Releasing
|
||||
|
||||
This project uses `cargo-release` for versioning and tagging.
|
||||
|
||||
1. Ensure you have `cargo-release` installed: `cargo install cargo-release`
|
||||
2. Prepare the release (dry-run): `cargo release [level] --dry-run` (e.g., `cargo release patch --dry-run`)
|
||||
3. Execute the release: `cargo release [level] --execute`
|
||||
4. Push the changes and tags: `git push --follow-tags`
|
||||
|
||||
Pushing a tag starting with `v` (e.g., `v0.5.1`) will trigger the GitHub Actions release pipeline, which builds artifacts for Illumos (OpenIndiana) and Linux, and creates a GitHub Release.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue