Adds CI Tests, Lints, Compile, Build #39
Workflow file for this run
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: Contracts Compile | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| checks: write | |
| actions: write | |
| contents: read | |
| concurrency: | |
| group: contracts-compile-${{ github.run_id }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| compile: | |
| name: Fast Compile Contracts | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 # Recommended by turbo team | |
| - name: Install Compact compiler | |
| id: setup | |
| shell: bash | |
| run: | | |
| # Set version variables | |
| COMPILER_VERSION="0.23.0" | |
| LANGUAGE_VERSION="0.15.0" | |
| # Create directory for compiler | |
| COMPACT_HOME="$HOME/compactc" | |
| mkdir -p "$COMPACT_HOME" | |
| cd "$COMPACT_HOME" | |
| echo "⬇️ Downloading Compact compiler..." | |
| cd "$COMPACT_HOME" | |
| curl -L https://d3fazakqrumx6p.cloudfront.net/artifacts/compiler/compactc_${COMPILER_VERSION}/compactc_v${COMPILER_VERSION}_x86_64-unknown-linux-musl.zip -o compactc.zip | |
| unzip compactc.zip | |
| chmod +x compactc.bin zkir compactc | |
| # Verify installation | |
| [ -f "$COMPACT_HOME/compactc" ] || { echo "::error::❌ Failed to install compiler - compactc not found"; exit 1; } | |
| # Test installation | |
| "$COMPACT_HOME/compactc" --version | |
| # Set up environment variables | |
| echo "COMPACT_HOME=$COMPACT_HOME" >> $GITHUB_ENV | |
| echo "$COMPACT_HOME" >> $GITHUB_PATH | |
| - name: Setup Environment | |
| uses: ./.github/actions/setup | |
| - name: Cleanup on failure | |
| if: failure() | |
| run: | | |
| echo "Compilation failed. Cleaning up..." | |
| rm -rf contracts/*/src/artifacts/ |