macOS Support #274
Workflow file for this run
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
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
types: [ "review_requested", "ready_for_review" ] | |
workflow_dispatch: | |
name: Linux | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
GITHUB_ACTIONS: true | |
VCPKG_ROOT: ${{github.workspace}}/vcpkg | |
jobs: | |
build: | |
name: "Build on x64" | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: "Setup Environment" | |
run: | | |
mkdir build | |
sudo add-apt-repository universe | |
sudo apt-get update -y | |
sudo apt-get install g++-14 gcc-14 xdg-user-dirs gettext tzdata locales -y | |
xdg-user-dirs-update | |
sudo locale-gen en_US.UTF-8 | |
sudo update-locale LANG=en_US.UTF-8 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 | |
- name: "Unlock Keyring" | |
uses: t1m0thyj/unlock-keyring@v1 | |
- name: "Vcpkg" | |
uses: johnwason/vcpkg-action@v6 | |
id: vcpkg | |
with: | |
pkgs: curl gettext-libintl glib gtest jsoncpp libsecret libuuid maddy openssl | |
triplet: x64-linux | |
revision: b27651341123a59f7187b42ef2bc476284afb310 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
github-binarycache: true | |
- name: "Build" | |
working-directory: ${{github.workspace}}/build | |
run: | | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install | |
cmake --build . | |
- name: "Install" | |
working-directory: ${{github.workspace}}/build | |
run: cmake --install . | |
- name: "Test" | |
run: ${{github.workspace}}/build/libnick_test | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/install | |
name: Linux-x64-Release |