Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JettChenT committed Sep 8, 2024
1 parent e8391dd commit 2191016
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 135 deletions.
139 changes: 69 additions & 70 deletions .github/workflows/build-apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Build Apple Apps
on:
push:
branches:
- main
- main
pull_request:
branches:
- "*"
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand All @@ -17,74 +17,73 @@ jobs:
fail-fast: false
matrix:
include:
- scheme: App
destination: generic/platform=iOS
platform: iOS
sdk-name: iphoneos
rust-targets:
- aarch64-apple-ios
- scheme: App
destination: platform=iOS Simulator,OS=18.0,name=iPhone 15 Pro
platform: iOS Simulator
sdk-name: iphonesimulator
rust-targets:
- aarch64-apple-ios-sim
- x86_64-apple-ios
- scheme: App
destination: platform=macOS
platform: macOS
sdk-name: macos
rust-targets:
- x86_64-apple-darwin
- aarch64-apple-darwin
- scheme: App
destination: generic/platform=iOS
platform: iOS
sdk-name: iphoneos
rust-targets:
- aarch64-apple-ios
- scheme: App
destination: platform=iOS Simulator,OS=18.0,name=iPhone 15 Pro
platform: iOS Simulator
sdk-name: iphonesimulator
rust-targets:
- aarch64-apple-ios-sim
- x86_64-apple-ios
- scheme: App
destination: platform=macOS
platform: macOS
sdk-name: macos
rust-targets:
- x86_64-apple-darwin
- aarch64-apple-darwin
env:
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
PROTOC_VERSION: 3.25.1
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
- name: Import Certificate
uses: ./.github/actions/import-cert
with:
certificate: ${{ secrets.DEVELOPER_CERT }}
password: ${{ secrets.DEVELOPER_CERT_PASSWORD }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ join(matrix.rust-targets, ', ') }}
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Build
id: build
uses: ./.github/actions/build-for-testing
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
- name: Run Unit Tests
if: ${{ matrix.xcode-unit-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-unit-test }}
artifact-prefix: unit-tests-${{ matrix.sdk-name }}
check-name: Xcode Unit Tests (${{ matrix.platform }})
- name: Run UI Tests
if: ${{ matrix.xcode-ui-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-ui-test }}
artifact-prefix: ui-tests-${{ matrix.sdk-name }}
check-name: Xcode UI Tests (${{ matrix.platform }})
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
- name: Import Certificate
uses: ./.github/actions/import-cert
with:
certificate: ${{ secrets.DEVELOPER_CERT }}
password: ${{ secrets.DEVELOPER_CERT_PASSWORD }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ join(matrix.rust-targets, ', ') }}
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Build
id: build
uses: ./.github/actions/build-for-testing
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
app-store-key: ${{ secrets.APPSTORE_KEY }}
app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }}
app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }}
- name: Run Unit Tests
if: ${{ matrix.xcode-unit-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-unit-test }}
artifact-prefix: unit-tests-${{ matrix.sdk-name }}
check-name: Xcode Unit Tests (${{ matrix.platform }})
- name: Run UI Tests
if: ${{ matrix.xcode-ui-test != '' }}
continue-on-error: true
uses: ./.github/actions/test-without-building
with:
scheme: ${{ matrix.scheme }}
destination: ${{ matrix.destination }}
test-plan: ${{ matrix.xcode-ui-test }}
artifact-prefix: ui-tests-${{ matrix.sdk-name }}
check-name: Xcode UI Tests (${{ matrix.platform }})
127 changes: 63 additions & 64 deletions .github/workflows/build-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,83 @@ name: Build Rust Crate
on:
push:
branches:
- main
- main
pull_request:
branches:
- "*"
- "*"
jobs:
build:
name: Build Crate (${{ matrix.platform }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: Linux
packages:
- gcc-aarch64-linux-gnu
test-targets:
- x86_64-unknown-linux-gnu
targets:
- aarch64-unknown-linux-gnu
- os: macos-13
platform: macOS (Intel)
xcode: /Applications/Xcode_15.2.app
test-targets:
- x86_64-apple-darwin
targets:
- x86_64-apple-ios
- os: macos-14
platform: macOS
- os: ubuntu-latest
platform: Linux
packages:
- gcc-aarch64-linux-gnu
test-targets:
- x86_64-unknown-linux-gnu
targets:
- aarch64-unknown-linux-gnu
- os: macos-13
platform: macOS (Intel)
xcode: /Applications/Xcode_15.2.app
test-targets:
- x86_64-apple-darwin
targets:
- x86_64-apple-ios
- os: macos-14
platform: macOS
xcode: /Applications/Xcode_16.0.app
test-targets:
- aarch64-apple-darwin
targets:
- aarch64-apple-ios
- aarch64-apple-ios-sim
- os: windows-2022
platform: Windows
test-targets:
- x86_64-pc-windows-msvc
targets:
- aarch64-pc-windows-msvc
test-targets:
- aarch64-apple-darwin
targets:
- aarch64-apple-ios
- aarch64-apple-ios-sim
- os: windows-2022
platform: Windows
test-targets:
- x86_64-pc-windows-msvc
targets:
- aarch64-pc-windows-msvc
runs-on: ${{ matrix.os }}
env:
DEVELOPER_DIR: ${{ matrix.xcode }}/Contents/Developer
CARGO_INCREMENTAL: 0
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
RUST_BACKTRACE: short
PROTOC_VERSION: 3.25.1
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
- name: Install Packages
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ${{ join(matrix.packages, ' ') }}
- name: Install Windows Deps
if: matrix.os == 'windows-2022'
shell: bash
run: echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin" >> $GITHUB_PATH
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
targets: ${{ join(matrix.targets, ', ') }}
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: cargo build --verbose --workspace --all-features --target ${{ join(matrix.targets, ' --target ') }} --target ${{ join(matrix.test-targets, ' --target ') }}
- name: Test
shell: bash
run: cargo test --verbose --workspace --all-features --target ${{ join(matrix.test-targets, ' --target ') }}
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
- name: Install Packages
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ${{ join(matrix.packages, ' ') }}
- name: Configure LLVM
if: matrix.os == 'windows-2022'
shell: bash
run: echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin" >> $GITHUB_PATH
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
targets: ${{ join(matrix.targets, ', ') }}
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: cargo build --verbose --workspace --all-features --target ${{ join(matrix.targets, ' --target ') }} --target ${{ join(matrix.test-targets, ' --target ') }}
- name: Test
shell: bash
run: cargo test --verbose --workspace --all-features --target ${{ join(matrix.test-targets, ' --target ') }}
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@
"rust-analyzer.inlayHints.typeHints.enable": false,
"rust-analyzer.linkedProjects": [
"./burrow/Cargo.toml"
]
],
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.autoIndent": "advanced",
"diffEditor.ignoreTrimWhitespace": false,
"editor.formatOnSave": false
}
}

0 comments on commit 2191016

Please sign in to comment.