Skip to content

Commit

Permalink
ci: Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MAHDTech committed Mar 28, 2023
1 parent 707c0f6 commit cc9c241
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 14 deletions.
117 changes: 105 additions & 12 deletions .github/workflows/release.yaml
Expand Up @@ -233,12 +233,6 @@ jobs:
toolchain: ${{ matrix.toolchain }}
default: true

- id: setup_rust_arm64
name: Setup the Rust environment for ARM64
if: matrix.target == 'aarch64-unknown-linux-gnu' && matrix.os == 'ubuntu-latest'
run: |
sudo apt install gcc-multilib
- id: checkout_repository
name: Checkout repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -274,9 +268,70 @@ jobs:
restore-keys: |
${{ matrix.target }}-target-
- id: cache_artifacts_vcpkg
name: Cache vcpkg
if: matrix.target == 'x86_64-pc-windows-msvc' && matrix.os == 'windows-latest'
uses: actions/cache@v2
with:
path: vcpkg
key: ${{ matrix.target }}-vcpkg-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.target }}-vcpkg-
- id: setup_rust_arm64
name: Setup the Rust environment for ARM64
if: matrix.target == 'aarch64-unknown-linux-gnu' && matrix.os == 'ubuntu-latest'
run: |
sudo apt install gcc-multilib
- id: setup_rust_macos
name: Setup the Rust environment for MacOS
if: matrix.target == 'x86_64-apple-darwin' && matrix.os == 'macos-latest'
run: |
brew install libmagic openssl pkg-config bzip2 figlet file gnu-tar zlib zstd
- id: setup_rust_windows
name: Setup the Rust environment for Windows
if: matrix.target == 'x86_64-pc-windows-msvc' && matrix.os == 'windows-latest'
shell: powershell
env:
VCPKG_INSTALLED: ${{ github.workspace }}/vcpkg/installed/
#VCPKG_DEFAULT_TRIPLET: "x64-windows-static" # (libcmt.lib)
VCPKG_DEFAULT_TRIPLET: "x64-windows-static-md" # (msvcrt.lib)
run: |
git clone https://github.com/microsoft/vcpkg.git
Push-Location -Path "vcpkg"
Start-Process ".\bootstrap-vcpkg.bat"
vcpkg.exe install curl:${env:VCPKG_DEFAULT_TRIPLET} libmagic:${env:VCPKG_DEFAULT_TRIPLET} openssl:${env:VCPKG_DEFAULT_TRIPLET} zlib:${env:VCPKG_DEFAULT_TRIPLET}
vcpkg.exe integrate install
Pop-Location
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
tree /F ${env:VCPKG_INSTALLED}
- id: cargo_check
name: Run Cargo check
if: matrix.target != 'x86_64-pc-windows-msvc'
run: |
cargo --version
cargo check --verbose
- id: cargo_check_windows
name: Run Cargo check (Windows)
if: matrix.target == 'x86_64-pc-windows-msvc' && matrix.os == 'windows-latest'
shell: powershell
env:
VCPKGRS_DYNAMIC: "1"
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
VCPKG_DEFAULT_TRIPLET: "x64-windows-static-md"
VCPKG_INSTALLED: ${{ github.workspace }}\vcpkg\installed
run: |
$env:LIBMAGIC_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
$env:OPENSSL_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
$env:OPENSSL_LIB_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\lib"
$env:OPENSSL_INCLUDE_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\include"
$env:LIB = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\lib;$env:LIB"
$env:INCLUDE = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\include;$env:INCLUDE"
$env:RUSTFLAGS = "-Ctarget-feature=+crt-static -L${env:LIBMAGIC_DIR}\lib"
cargo --version
cargo check --verbose
Expand All @@ -296,19 +351,57 @@ jobs:
cargo clippy --version
cargo clippy --all --all-features -- -D warnings
- id: cargo_build
name: Run Cargo build
if: matrix.target != 'x86_64-pc-windows-msvc'
run: |
cargo --version
cargo build --verbose --release
- id: cargo_build_windows
name: Run Cargo build (Windows)
if: matrix.target == 'x86_64-pc-windows-msvc' && matrix.os == 'windows-latest'
shell: powershell
env:
VCPKGRS_DYNAMIC: "1"
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
VCPKG_DEFAULT_TRIPLET: "x64-windows-static-md"
VCPKG_INSTALLED: ${{ github.workspace }}\vcpkg\installed
run: |
$env:LIBMAGIC_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
$env:OPENSSL_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
$env:OPENSSL_LIB_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\lib"
$env:OPENSSL_INCLUDE_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\include"
$env:LIB = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\lib;$env:LIB"
$env:INCLUDE = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\include;$env:INCLUDE"
$env:RUSTFLAGS = "-Ctarget-feature=+crt-static -L${env:LIBMAGIC_DIR}\lib"
cargo build --verbose --release
- id: cargo_test
name: Run Cargo tests
if: matrix.target != 'x86_64-pc-windows-msvc'
run: |
cargo --version
cargo test --verbose
- id: cargo_build
name: Run Cargo build
- id: cargo_test_windows
name: Run Cargo tests (Windows)
if: matrix.target == 'x86_64-pc-windows-msvc' && matrix.os == 'windows-latest'
shell: powershell
env:
VCPKGRS_DYNAMIC: "1"
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
VCPKG_DEFAULT_TRIPLET: "x64-windows-static-md"
VCPKG_INSTALLED: ${{ github.workspace }}\vcpkg\installed
run: |
rustup target add ${{ matrix.target }}
rustup target list --toolchain ${{ matrix.toolchain }}
cargo --version
cargo build --verbose --release --target=${{ matrix.target }}
$env:LIBMAGIC_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
$env:OPENSSL_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET"
$env:OPENSSL_LIB_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\lib"
$env:OPENSSL_INCLUDE_DIR = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\include"
$env:LIB = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\lib;$env:LIB"
$env:INCLUDE = "$env:VCPKG_INSTALLED\$env:VCPKG_DEFAULT_TRIPLET\include;$env:INCLUDE"
$env:RUSTFLAGS = "-Ctarget-feature=+crt-static -L${env:LIBMAGIC_DIR}\lib"
cargo test --verbose
- id: archive_rust
name: Archive Rust artifacts (cross-platform)
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Expand Up @@ -4,6 +4,9 @@ name = "loopy"
description = "Kubernetes packaging inner feedback loop."
version = "0.1.0"
edition = "2021"
license-file = "LICENSE"
homepage = "https://github.com/salt-labs/loopy"
documentation = "https://github.com/salt-labs/loopy"

[dependencies]
anyhow = "1.0"
Expand Down
10 changes: 10 additions & 0 deletions config/capi/kind/hostpath-provisioner.yaml
Expand Up @@ -125,3 +125,13 @@ metadata:
storageclass.kubernetes.io/is-default-class: "true"
reclaimPolicy: Delete
provisioner: example.com/hostpath

---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: vsan-default-storage-policy
annotations:
storageclass.kubernetes.io/is-default-class: "false"
reclaimPolicy: Delete
provisioner: example.com/hostpath
2 changes: 1 addition & 1 deletion config/manifests/confluence/rbac.yaml
Expand Up @@ -47,7 +47,7 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: confluence-system-privileged
namespace: atlassian-confluence
namespace: confluence
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
2 changes: 1 addition & 1 deletion config/manifests/confluence/secret.yaml
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: credentials-db
namespace: atlassian-confluence
namespace: confluence
data:
password: ZGJfcGFzc3dvcmQ=
username: ZGJfdXNlcm5hbWU=

0 comments on commit cc9c241

Please sign in to comment.