Skip to content

Commit

Permalink
Merge pull request #2 from hacspec/fstar-version
Browse files Browse the repository at this point in the history
Add an option for F* version
  • Loading branch information
franziskuskiefer authored Jan 23, 2025
2 parents db7f921 + 9df2fe4 commit 3172f19
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ jobs:
test-action:
runs-on: "ubuntu-latest"
steps:
- uses: hacspec/hax-actions@main
- uses: actions/checkout@v4
- uses: ./
with:
fstar: v2024.12.03
- run: |
echo "HAX_PROOF_LIBS=$HAX_PROOF_LIBS"
echo "HAX_LIB=$HAX_LIB"
echo "HACL_HOME=$HACL_HOME"
echo "F* version"
fstar.exe --version
echo "hax help"
cargo hax --help
echo "hax version"
cargo hax --version
30 changes: 27 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,43 @@ inputs:
hax_repository:
required: true
default: "github:hacspec/hax"
fstar:
required: true
runs:
using: "composite"
steps:
- uses: DeterminateSystems/nix-installer-action@main

- name: Install & configure Cachix
shell: bash
run: |
nix-env --quiet -j8 -iA cachix -f https://cachix.org/api/v1/install
cachix use hax
- name: Install F*
shell: bash
run: |
VARIANT="Linux-x86_64"
# Find download URL for the Linux build
URL=$(curl -sL "https://api.github.com/repos/FStarLang/FStar/releases/tags/$FSTAR" | jq '.assets.[] | .browser_download_url | select(contains("Linux"))' -r)
# Download
echo "Trying to download $URL"
curl -sL "$URL" -o fstar.tar.gz
# Extract
tar -xzf fstar.tar.gz
mv fstar hax-actions-fstar-binary
echo "$PWD/hax-actions-fstar-binary/bin" >> $GITHUB_PATH
env:
FSTAR: "${{ inputs.fstar }}"
OS: "${{ runner.os }}"

- name: Install binaries
- name: Install hax
shell: bash
run: nix profile install "$FLAKE"#hax "$FLAKE"#fstar
run: nix profile install "$FLAKE"#hax
env:
FLAKE: "${{ inputs.hax_repository }}/${{ inputs.hax_reference }}"




0 comments on commit 3172f19

Please sign in to comment.