Skip to content

Commit

Permalink
Use actions/checkout to checkout Anoma
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcadman committed Jan 17, 2025
1 parent 6b8095e commit a9b369b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ jobs:
path: main
submodules: true

- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: anoma/anoma
ref: ${{ env.ANOMA_VERSION }}
path: anoma

- name: Add ~/.local/bin to PATH
run: |
mkdir -p "$HOME/.local/bin"
Expand All @@ -144,25 +151,21 @@ jobs:
id: cache-anoma
uses: actions/cache@v3
with:
path: |
${{ env.HOME }}/anoma
key: "${{ runner.os }}-anoma"
path: ${{ github.workspace }}/anoma
key: "${{ runner.os }}-${{ env.ANOMA_VERSION }}-anoma"

- name: Install Protobuf Elixir dependencies
shell: bash
working-directory: ${{ github.workspace }}/anoma
run: |
cd anoma
version=$(echo -n $(elixir -e "$(<mix.lock) |> Map.get(:protobuf) |> elem(2) |> IO.puts"))
echo "version: ${version}"
mix escript.install hex protobuf "$version" --force
- name: Build anoma
if: steps.cache-anoma.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/anoma
run: |
cd $HOME
git clone https://github.com/anoma/anoma.git
cd anoma
git checkout ${{ env.ANOMA_VERSION }}
mix local.hex --force
echo "$HOME/.mix/escripts" >> $GITHUB_PATH
mix deps.get
Expand Down Expand Up @@ -202,7 +205,7 @@ jobs:
- name: Set ANOMA_PATH
run: |
echo "ANOMA_PATH=$HOME/anoma" >> $GITHUB_ENV
echo "ANOMA_PATH=${{ github.workspace }}/anoma" >> $GITHUB_ENV
- run: echo "HOME=$HOME" >> $GITHUB_ENV
shell: bash
Expand Down

0 comments on commit a9b369b

Please sign in to comment.