Upgrade to Zig 0.12 #100
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: Elixir CI | |
on: | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
concurrency: | |
group: manx-build-and-test-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
KINDA_PRINT_LINKAGES: 1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | |
strategy: | |
matrix: | |
otp: ["25.0"] | |
elixir: ["1.14.0"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Set up Zig | |
uses: goto-bus-stop/setup-zig@v1 | |
with: | |
version: 0.12.0 | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-kinda-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix-kinda- | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: ./kinda_example/deps | |
key: ${{ runner.os }}-mix-example-${{ hashFiles('**/mix.exs') }} | |
restore-keys: ${{ runner.os }}-mix-example- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Run tests | |
run: | | |
mix test | |
- name: Install dependencies (example) | |
working-directory: ./kinda_example | |
run: mix deps.get | |
- name: Run tests (example) | |
working-directory: ./kinda_example | |
run: | | |
mix test --force | |
- name: Precompile | |
working-directory: ./kinda_example | |
env: | |
MIX_ENV: prod | |
ELIXIR_MAKE_CACHE_DIR: . | |
run: | | |
rm -rf _build | |
mix elixir_make.precompile | |
- name: Start mock server in the background | |
working-directory: ./kinda_example | |
run: | | |
python3 -m http.server --directory . &> /dev/null & | |
sleep 3 | |
ps aux | |
- name: Test precompiled | |
working-directory: ./kinda_example | |
run: | | |
MIX_ENV=prod mix elixir_make.checksum --all --ignore-unavailable --only-local --print | |
mix clean | |
mix test --exclude vulkan --exclude todo |