chore(ci): CI maintenance #783
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
name: Main | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
generate_release: | |
description: Generate release | |
required: true | |
type: boolean | |
version: | |
required: false | |
type: string | |
jobs: | |
setup_config: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup config artifact | |
run: | | |
echo "MANAGED_VERSION=${{ inputs.version }}" | |
MANAGED_VERSION=${{ inputs.version }} | |
if [ -z "$MANAGED_VERSION" ] | |
then | |
echo "Managed version is empty! Setting it up to $(date '+%Y.%-m.%-d')!" | |
echo "MANAGED_VERSION=$(date '+%Y.%-m.%-d')" | |
MANAGED_VERSION=$(date '+%Y.%-m.%-d') | |
fi | |
echo "version = \"$MANAGED_VERSION\"" >> config.txt | |
echo "Writing to file..." | |
cat config.txt | |
- uses: actions/[email protected] | |
with: | |
name: config.txt | |
path: config.txt | |
#### NATIVE BUILD #### | |
native_build_linux: | |
needs: [rust_code_format, setup_config] | |
runs-on: "ubuntu-20.04" # Ensure we build with the minimum supported sysroot | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/native/native-build-linux | |
native_build_macos: | |
needs: [rust_code_format, setup_config] | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/native/native-build-macos | |
native_build_ios: | |
needs: [rust_code_format, setup_config] | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/native/native-build-ios | |
native_build_windows: | |
needs: [rust_code_format, setup_config] | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/native/native-build-windows | |
#### NUGET BUILD #### | |
nugets_windows: | |
needs: [native_build_linux, native_build_macos, native_build_ios, native_build_windows , setup_config] # All Natives for dotnet-core | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/nugets/nugets-windows | |
#### WEB ASSEMBLY BUILD #### | |
webassembly_build: | |
needs: rust_code_format | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/other/webassembly-build | |
#### WEB ASSEMBLY TEST #### | |
webassembly_test: | |
needs: webassembly_build | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/webassembly/safari | |
#### TESTS NUGETS #### | |
tests_nuget_windows: | |
needs: [nugets_windows, setup_config] | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/csharp/windows | |
tests_nuget_macos: | |
needs: [nugets_windows, setup_config] | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/csharp/macos | |
tests_nuget_ios: | |
needs: [nugets_windows, setup_config] | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/csharp/ios | |
tests_nuget_linux: | |
needs: [nugets_windows, setup_config] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/csharp/linux | |
##### SWIFT TESTS ##### | |
tests_swift: | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/swift | |
##### KOTLIN BUILD ##### | |
build_kotlin: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/kotlin | |
tests_nuget_android: | |
needs: [nugets_windows, setup_config] | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/tests/csharp/android | |
#### CODE FORMATTING #### | |
rust_code_format: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/formatting/rust | |
csharp_code_format: | |
needs: setup_config | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/formatting/csharp | |
#### PYTHON BUILD #### | |
build_python_linux: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/python/build/linux | |
build_python_macos: | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/python/build/macos | |
build_python_windows: | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/python/build/windows | |
#### PYTHON TEST #### | |
test_python_linux: | |
needs: build_python_linux | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/tests/python/linux | |
test_python_macos: | |
needs: build_python_macos | |
runs-on: "macos-15" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/tests/python/macos | |
test_python_windows: | |
needs: build_python_windows | |
runs-on: "windows-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/tests/python/windows | |
#### PUBLISH SOURCE #### | |
source_publish: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- run: git lfs pull | |
- uses: ./.github/workflows/other/source-publish | |
publish_sbom: | |
runs-on: "ubuntu-latest" | |
if: ${{ github.event.inputs.generate_release == 'true' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check out devolutions/actions | |
uses: actions/checkout@v4 | |
with: | |
path: ./.github/workflows | |
ref: v1 | |
repository: Devolutions/actions | |
token: ${{ secrets.DEVOLUTIONSBOT_TOKEN }} | |
- name: Generate Rust SBOM | |
uses: ./.github/workflows/cyclonedx-rust-generate | |
with: | |
path: . | |
- name: Save BOM | |
uses: actions/[email protected] | |
with: | |
name: bom_devolutions_crypto_rust.xml | |
path: ./bom.xml | |
- name: Upload SBOM | |
uses: ./.github/workflows/dtrack-upload-sbom | |
with: | |
api_key: ${{ secrets.DTRACK_AUTOMATION_API_KEY }} | |
autocreate: 'true' | |
bom_filename: devolutions-crypto/bom.xml | |
project_name: 'devolutions-crypto' | |
project_version: ${{ github.event.inputs.version }} | |
server_hostname: 'dtrack-api.devolutions.com' |