Add ubuntu-arm64 and osx-aarch64 nuget packages, drop _haswell packa… #234
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| tags-ignore: | |
| - 'v*' | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| # setup different OS and targets | |
| # TODO: add musl+mimalloc-secure for linux builds to drop libc dependency | |
| include: | |
| - name: ubuntu_20_04-x86_64 | |
| os: ubuntu-20.04 | |
| TARGET_CPU: x86-64 | |
| - name: ubuntu_22_04-x86_64 | |
| os: ubuntu-22.04 | |
| TARGET_CPU: x86-64 | |
| - name: osx_13-x86_64 | |
| os: macos-13 | |
| TARGET_CPU: haswell | |
| - name: win-x86_64 | |
| os: windows-2019 | |
| TARGET_CPU: x86-64 | |
| - name: osx_14-aarch64 | |
| os: macos-14 | |
| TARGET_CPU: apple-m1 | |
| - name: ubuntu_24-arm64 | |
| os: ubuntu-24-arm-32gb | |
| TARGET_CPU: generic | |
| runs-on: ${{matrix.os}} | |
| steps: | |
| - run: rustup show | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| ### Cargo Cache for Build Artifacts ### | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-${{matrix.name}}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install NASM | |
| uses: ./.github/actions/install-nasm | |
| ### Check Build ### | |
| - name: Check Build | |
| run: cargo check --all | |
| ### Test Code ### | |
| - name: Test Build | |
| run: cargo test --all | |
| env: | |
| RUSTFLAGS: -C target-cpu=${{matrix.TARGET_CPU}} | |
| ### Build the code ### | |
| - name: Build Release | |
| run: cargo build --all | |
| shell: bash | |
| env: | |
| RUSTFLAGS: -C target-cpu=${{matrix.TARGET_CPU}} | |
| test_win32: | |
| runs-on: windows-2019 | |
| steps: | |
| - run: rustup show | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| ### Install Nasm with fallback to S3 ### | |
| - name: Install nasm | |
| uses: ./.github/actions/install-nasm | |
| ### Cargo cache for Build artifacts ### | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-windows-test-32-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install latest 32bit target | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| #components: rustfmt, clippy | |
| target: i686-pc-windows-msvc | |
| ### check and test build ### | |
| - name: Check Build | |
| run: cargo check --all --target=i686-pc-windows-msvc | |
| - name: Test Build | |
| run: cargo test --all --release --target=i686-pc-windows-msvc | |