-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Merge branch 'release/4.17.0'
- Loading branch information
Showing
5 changed files
with
62 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
kms_version: | ||
description: KMS version | ||
type: string | ||
default: 4.11.0 | ||
default: '4.17.0' | ||
|
||
jobs: | ||
kms-gui-build: | ||
|
@@ -24,69 +24,45 @@ jobs: | |
rustup target add x86_64-apple-darwin | ||
build: | | ||
cargo build --release --target x86_64-apple-darwin | ||
archive_name: ckms_gui_macos | ||
archive_name: ckms_gui_macos_intel | ||
ckms_gui: ./target/x86_64-apple-darwin/release/ckms_gui | ||
- os: macos-14 | ||
prerequisites: | | ||
rustup target add aarch64-apple-darwin | ||
build: | | ||
cargo build --release --target aarch64-apple-darwin | ||
archive_name: ckms_gui_macos_arm | ||
ckms_gui: ./target/aarch64-apple-darwin/release/ckms_gui | ||
- os: ubuntu-22.04 | ||
prerequisites: | | ||
sudo apt install librust-atk-sys-dev librust-gdk-sys-dev libssl-dev pkg-config | ||
build: | | ||
cargo build --release | ||
archive_name: ckms_gui_ubuntu_22_04 | ||
ckms_gui: ./target/release/ckms_gui | ||
# - os: ubuntu-22.04 | ||
# prerequisites: | | ||
# sudo apt install librust-atk-sys-dev librust-gdk-sys-dev libssl-dev | ||
# sudo apt-get install --no-install-recommends -qq libclang-dev gcc-mingw-w64-x86-64 | ||
# rustup target add x86_64-pc-windows-gnu | ||
# build: | | ||
# cargo build --release --target x86_64-pc-windows-gnu | ||
# archive_name: ckms_gui_windows | ||
# ckms_gui: ./target/x86_64-pc-windows-gnu/release/ckms_gui | ||
- os: ubuntu-24.04 | ||
prerequisites: | | ||
sudo apt install libgtk-3-dev libglib2.0-dev libssl-dev pkg-config | ||
build: | | ||
cargo build --release | ||
archive_name: ckms_gui_ubuntu_24_04 | ||
ckms_gui: ./target/release/ckms_gui | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up cargo cache | ||
id: cargo_cache | ||
uses: actions/cache@v3 | ||
continue-on-error: false | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ matrix.os }}-kms-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo-${{ matrix.os }}-kms-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- uses: dtolnay/rust-toolchain@master | ||
if: steps.cargo_cache.outputs.cache-hit != 'true' | ||
with: | ||
toolchain: nightly-2024-01-09 | ||
components: rustfmt, clippy | ||
|
||
- name: Set KMS version | ||
if: inputs.kms_version && contains(runner.os, 'Linux') | ||
run: | | ||
sed -i "s/4.11.0/${VERSION}/g" Cargo.toml | ||
sed -i "s/4.11.0/${VERSION}/g" build.rs | ||
env: | ||
VERSION: ${{ inputs.kms_version }} | ||
|
||
- name: Set KMS version | ||
if: inputs.kms_version && contains(runner.os, 'Mac') | ||
run: | | ||
sed -i '' "s/4.11.0/${VERSION}/g" Cargo.toml | ||
sed -i '' "s/4.11.0/${VERSION}/g" build.rs | ||
env: | ||
VERSION: ${{ inputs.kms_version }} | ||
|
||
- name: Install prerequisites | ||
run: ${{ matrix.prerequisites }} | ||
|
||
- name: Build | ||
run: ${{ matrix.build }} | ||
env: | ||
VERSION: ${{ inputs.kms_version }} | ||
|
||
- name: Upload KMS for ${{ matrix.os }} | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -104,30 +80,38 @@ jobs: | |
needs: | ||
- kms-gui-build | ||
runs-on: [self-hosted, not-sgx] | ||
container: | ||
image: cosmian/docker_doc_ci | ||
volumes: | ||
- /home/cosmian/.ssh/id_rsa:/root/.ssh/id_rsa | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- archive_name: ckms_gui_macos | ||
- archive_name: ckms_gui_macos_intel | ||
- archive_name: ckms_gui_macos_arm | ||
- archive_name: ckms_gui_ubuntu_22_04 | ||
# - archive_name: ckms_gui_windows | ||
- archive_name: ckms_gui_ubuntu_24_04 | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- run: find . | ||
|
||
- name: Creating zip to be attached to release | ||
run: | | ||
sudo apt-get install -y zip | ||
apt update -y | ||
apt-get install -y zip | ||
rm -f ${{ matrix.archive_name }}.zip | ||
zip -r ${{ matrix.archive_name }}.zip ${{ matrix.archive_name }} | ||
- name: Push to package.cosmian.com | ||
if: inputs.kms_version | ||
run: | | ||
set -x | ||
DESTINATION_DIR=/mnt/package/kms/$VERSION | ||
ssh [email protected] mkdir -p $DESTINATION_DIR | ||
scp ${{ matrix.archive_name }}.zip [email protected]:$DESTINATION_DIR/ | ||
ssh -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa [email protected] mkdir -p $DESTINATION_DIR | ||
scp -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa ${{ matrix.archive_name }}.zip [email protected]:$DESTINATION_DIR/ | ||
env: | ||
VERSION: ${{ inputs.kms_version }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
src/main.rs | ||
/src/main.rs | ||
/target | ||
./.cargo_check |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters