diff --git a/.github/workflows/build-sm64.yml b/.github/workflows/build-sm64.yml index 1b27da7..e273705 100644 --- a/.github/workflows/build-sm64.yml +++ b/.github/workflows/build-sm64.yml @@ -8,33 +8,36 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set Up Nix and Devenv + - name: Install Nix and Devenv + uses: cachix/install-nix-action@v26 + with: + nix_version: '2.26.3' # Optional: specify a Nix version if needed + + - name: Install Devenv run: | - # Install Nix as a daemon - sh <(curl -L https://nixos.org/nix/install) --daemon + nix profile install nixpkgs#devenv - # Source the correct profile and set up environment variables - NIX_LINK=$HOME/.nix-profile - export NIX_PROFILES="/nix/var/nix/profiles/default:$NIX_LINK" - export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share" - export PATH="$NIX_LINK/bin:/nix/var/nix/profiles/default/bin:$PATH" - - # Install Devenv - nix-env --install --attr devenv -f https://github.com/NixOS/nixpkgs/tarball/nixpkgs-unstable - - # Copy devenv configuration files - cp devenv.nix /root/.config/devenv/ - cp devenv.yaml /root/.config/devenv/ - - # Start the Devenv environment - devenv up - shell: bash + - name: Build the Devenv shell and run any pre-commit hooks + run: devenv test + - name: Run a single command in the Devenv shell + run: devenv shell hello + + - name: Run a multi-line command in the Devenv shell + shell: devenv shell bash -- -e {0} + run: | + hello + say-bye + - name: Install Android Emulator (AArch64 & ARMv7) run: | sdkmanager --install "system-images;android-32;google_apis;arm64-v8a"