feat(optimizer): add generic keyset info generation #69
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: concrete-compiler test macos-cpu | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- .github/workflows/concrete_compiler_test_macos_cpu.yml | |
- compilers/** | |
- backends/** | |
- tools/** | |
push: | |
branches: | |
- 'main' | |
- 'release/*' | |
env: | |
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
concurrency: | |
group: concrete_compiler_test_macos_cpu_${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
build-and-test: | |
strategy: | |
# if a failure happens, we want to know if it's specific | |
# to the architecture or the operating system | |
fail-fast: false | |
matrix: | |
runson: ["aws-mac1-metal", "aws-mac2-metal"] | |
python-version: ["3.10"] | |
runs-on: ${{ matrix.runson }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup rust toolchain for concrete-cpu | |
uses: ./.github/actions/setup_rust_toolchain_for_concrete_cpu | |
- name: Set python variables | |
run: | | |
{ | |
echo "PIP=${{ format('pip{0}', matrix.python-version) }}" | |
echo "PYTHON=${{ format('python{0}', matrix.python-version) }}" | |
echo "PYTHON_EXEC=$(which ${{ format('python{0}', matrix.python-version) }})" | |
} >> "${GITHUB_ENV}" | |
- name: Install dependencies | |
run: | | |
brew install ninja ccache | |
${PIP} install pytest | |
- name: Build compiler | |
run: | | |
set -e | |
cd compilers/concrete-compiler/compiler | |
echo "Debug: ccache statistics (prior to the build):" | |
ccache -s | |
make Python3_EXECUTABLE="${PYTHON_EXEC}" all | |
echo "Debug: ccache statistics (after the build):" | |
ccache -s | |
- name: Enable complete tests on push to main | |
if: github.ref == 'refs/heads/main' | |
run: echo "MINIMAL_TESTS=OFF" >> "${GITHUB_ENV}" | |
- name: Enable minimal tests otherwise | |
if: github.ref != 'refs/heads/main' | |
run: echo "MINIMAL_TESTS=ON" >> "${GITHUB_ENV}" | |
- name: Create keyset cache directory | |
run: | | |
KEY_CACHE_DIRECTORY=$(mktemp -d)/KeySetCache | |
export KEY_CACHE_DIRECTORY | |
echo "KEY_CACHE_DIRECTORY=${KEY_CACHE_DIRECTORY}" >> "${GITHUB_ENV}" | |
mkdir "${KEY_CACHE_DIRECTORY}" | |
- name: Test | |
run: | | |
set -e | |
cd compilers/concrete-compiler/compiler | |
export CONCRETE_COMPILER_DATAFLOW_EXECUTION_ENABLED=OFF | |
make MINIMAL_TESTS=${{ env.MINIMAL_TESTS }} Python3_EXECUTABLE="${PYTHON_EXEC}" run-tests | |
- name: Cleanup host | |
if: success() || failure() | |
run: | | |
rm -rf "${KEY_CACHE_DIRECTORY}" | |
- name: Slack Notification | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
continue-on-error: true | |
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: "build-and-test finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})" |